- said:
That's the sort of thing I was looking for, but unfortunately variations on
this either cause an error in the unzipping process or creates a folder on
the desktop called %blah%.
You could try using %ProgramFiles%, although I don't know if that environment
variable is available in Windows 98.
I'd recommend installing Windows Script Host on all the computers and using the
following script:
var debug = false;
var wshShell = new ActiveXObject("WScript.Shell");
var regKey =
"HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\ProgramFilesDir";
var programFiles = wshShell.RegRead(regKey);
var commandLine = "winzip32 -e -o test.zip \"" + programFiles +
"\\Destination\"";
if (!debug) {
wshShell.Run(commandLine, 7, false);
}
var dialogText = "Installing My Program... please wait";
var dialogWait = 5; // seconds
var dialogTitle = "Setup";
if (debug) {
dialogText += "\n\nUsing: " + commandLine;
}
var dialogType = 0; // OK button
dialogType += 64; // Information icon
wshShell.Popup(dialogText, dialogWait, dialogTitle, dialogType);
The Registry key referred to should be available on all versions of Windows,
you can test the script by setting debug = true;
To execute the script, it's "cscript thescript.js".