home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2002 December
/
12_02.iso
/
test
/
swapper
/
Swapper.msi
/
_B250BAD5AFB55F2F16775EE57768F473
/
_FF9F2F9C7CE0476F98B8C236C3F98494
< prev
Wrap
Text File
|
2002-10-03
|
1KB
|
49 lines
var WshShell = new ActiveXObject("WScript.Shell");
WshShell.Run("calc.exe", 1, true);
var x;
/*
var args = WScript.Arguments;
if (1 != args.Length)
{
// WScript.Echo("usage incorrect, must have 1 argument 'install' 'commit' 'uninstall' 'rollback'");
WScript.Quit();
}
var arg = new String(args.Item(0));
*/
fsdafasf;
var arg = "commit";
if (arg=="commit" || arg=="uninstall")
{
var commit = (arg == "commit");
var FSO = new ActiveXObject("Scripting.FileSystemObject");
var Folder = FSO.GetFolder(WshShell.CurrentDirectory);
//WScript.Echo(WshShell.CurrentDirectory);
var eFiles = new Enumerator(Folder.Files);
eFiles.moveFirst();
while (!eFiles.atEnd())
{
var file = eFiles.item();
var fn = new String(file.Name);
var ext = fn.substr(fn.length-4);
var fnnoext = fn.substr(0, fn.length-4);
if (fn.toLowerCase().indexOf("rsllc")==0)
{
if (ext==".exe" || ext==".dll")
{
fn = "ngen /delete "+fnnoext;
// WScript.Echo(fn);
WshShell.Run(fn, 1, true);
if (commit)
{
fn = "ngen "+file.Name;
// WScript.Echo(fn);
WshShell.Run(fn, 1, true);
}
}
}
eFiles.moveNext();
}
}