PDA

View Full Version : Silent installation of Windows Scripting Host?


pww
03-18-2006, 02:55 PM
Hi,

my app requires Windows Scripting Host to be installed, latest 5.6 version.

I wonder if there is a completely silent way to install WSH.

I think to include Microsoft WSH installers scripten.exe (for 2000/XP) and scr56en.exe (for NT4/9x/Me) as primer files, and run one of them depending on the user OS before my app installation.

Although Microsoft installers accept a /Q switch that supresses most messages and dialogs, it does not ensure a completely silent installation - still an extraction progress bar at the beginning appears and sometimes a prompt to reboot at the end - I want to avoid both.
Anyone knows how?

Note that you can't just include the needed ocx/dll's in your setup because they are protected (on 2000/XP and later) and Windows will not allow the installer to update them - the only way to update WSH on 2000/XP is to run the Microsoft's installer logged as admin.

Thanks

Steve_K
03-19-2006, 01:42 AM
I doubt there's a way to suppress any possible message coming from the MSI installer. If the /Q switch does not suppress everything that might be displayed, then there's no way to do that from outside the MSI ...

Actually, I think that messages that are displayed although you use the /Q switch, are coming from the operating system itselft and not from the MSI engine ...

Steve

pww
03-20-2006, 04:37 AM
Actually WSH installers are not .msi's, they are self-extracting .exe's which can be unpacked with an archiver like winrar.
Inside there are about 15 files (ocx/dll/exe) and an .inf file for installation.

If I unpack the installer and install using the .inf file, there are no messages or dialogs - but this way on Windows 2000 I see errors 'file not found' about every file, which do not appear if I run the unpacked .exe. On 9.x and XP the installation seem to go OK.
I someone here managed to install WSH silently please advice how.

Jason Pate
03-24-2006, 04:54 PM
With most Windows Installer programs, I extract the files, then on the MSI itself do a /? to see what options it supports. Sometimes you can get completely slient some times you can. there is a /passive that some support. One think you will have to do is track down the MSI installer I use a nice trick "File.GetDefaultViewer" to locate it then do a file run. Something like this:

WININSTALLER = File.GetDefaultViewer(".msi")
Nresult = File.Run(WININSTALLER, _TempFolder.."\\install.msi".."/OANYOPTIONSYOUCANUSELIKE /passive", "", , true)