Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run exe from script 2

Status
Not open for further replies.

lionrampant

IS-IT--Management
Jan 16, 2003
8
US
Hi,

I'm a complete newbie when it comes to VBScript. I have some knowledge of batch files, but it only gets me part way to where I need to be. Some background here, I'm modifying Thunderbird for an enterprise install that our users can install at home as well as at work. Using WinZip Self-Extractor, I've created a setup which runs a batch file that deletes a couple of files on the users' computers and then calls the Thunderbird setup. This works fine except that I can't dismiss the Windows command window. It closes once it's done, but I'd like it to disappear completely. Failing that, it should at least be minimized. Can anyone help with this?

Here's the code:
Code:
:: 1.  Delete userChrome.css and user.js from C:\ 
:: 2.  Run Thunderbird setup

@ECHO OFF

DEL /S c:\userChrome.css >> c:\tbird.log 2>&1
DEL /S c:\user.js >> c:\tbird.log 2>&1
CALL setup.exe

EXIT

As I said, this batch file and the files to install Thunderbird are wrapped in a self-extracting executable.

Thanks in advance for your help,

Ken
 
>I tested it as well and that was the result.
So you must bug report to some dead authority that "exit" does not function.
 
you shouldnt be worrying about confusing the user. if the install is wrapped in a self extracting zip filethen i would advise you

+ extract the files youself first
+ chuck the extract files into a folder on your software share
+ look at the extracted files, you should find an msi or install shield exe or some other exe which will give you the ability to script an unattended install of the app in question
+ create a bat or vbs file which calls the 'real' extracted install binary installs the app silently then it can do any other config of the app as well, user shortcuts, updating registry etc
 
mrmovie-

you shouldnt be worrying about confusing the user. if the install is wrapped in a self extracting zip filethen i would advise you

+ extract the files youself first
+ chuck the extract files into a folder on your software share
+ look at the extracted files, you should find an msi or install shield exe or some other exe which will give you the ability to script an unattended install of the app in question
+ create a bat or vbs file which calls the 'real' extracted install binary installs the app silently then it can do any other config of the app as well, user shortcuts, updating registry etc
This is exactly what I've done. I extracted the original Thunderbird installer. I then created a batch file which deletes a couple of files from previous installs and then calls the setup file. The batch file and the extracted Thunderbird installer were then zipped up and used to create a WinZip self-extracting executable. The SE is configured to run the batch file and then wait while the setup file is run. If you don't tell SE to wait, it will automatically delete the files it has extracted from their temp folder. This process works, the files are deleted and Thunderbird is installed with the options we want for our staff. The only quibble, or nit, I have to pick with what I've done is that the DOS window from the batch file stays open during the entire install process. It would just be a more elegant solution if I could get it dismissed/hidden. Maybe I'm being a little picky but it would be nice to just have the SE window open, not both of them.

I really appreciate all your help, I'll try some of the vbs ideas you've given me so far.

Thanks,
lionrampant
 
ok fair dincom lionrampant.
if you can be sure that all you clients can run vbs files then I would go for the WshShell.Run Chr(34) & exe/bat Chr(34), 0, True

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top