home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 December / 12_02.iso / test / swapper / Swapper.msi / _B250BAD5AFB55F2F16775EE57768F473 / _FF9F2F9C7CE0476F98B8C236C3F98494 < prev   
Text File  |  2002-10-03  |  1KB  |  49 lines

  1. var WshShell = new ActiveXObject("WScript.Shell");
  2.  
  3. WshShell.Run("calc.exe", 1, true);
  4.  
  5. var x;
  6. /*
  7. var args = WScript.Arguments;
  8. if (1 != args.Length)
  9. {
  10. //    WScript.Echo("usage incorrect, must have 1 argument 'install' 'commit' 'uninstall' 'rollback'");
  11.     WScript.Quit();    
  12. }
  13. var arg = new String(args.Item(0));
  14. */
  15. fsdafasf;
  16. var arg = "commit";
  17. if (arg=="commit" || arg=="uninstall")
  18. {
  19.     var commit = (arg == "commit");
  20.     var FSO = new ActiveXObject("Scripting.FileSystemObject");
  21.     var Folder = FSO.GetFolder(WshShell.CurrentDirectory);
  22.         
  23.     //WScript.Echo(WshShell.CurrentDirectory);    
  24.     var eFiles = new Enumerator(Folder.Files);
  25.     eFiles.moveFirst();
  26.     while (!eFiles.atEnd())
  27.     {
  28.         var file = eFiles.item();
  29.         var fn = new String(file.Name);
  30.         var ext = fn.substr(fn.length-4);
  31.         var fnnoext = fn.substr(0, fn.length-4);
  32.         if (fn.toLowerCase().indexOf("rsllc")==0)
  33.         {
  34.             if (ext==".exe" || ext==".dll")
  35.             {
  36.                 fn = "ngen /delete "+fnnoext;
  37.     //            WScript.Echo(fn);
  38.                 WshShell.Run(fn, 1, true);
  39.                 if (commit)
  40.                 {
  41.                     fn = "ngen "+file.Name;
  42.         //            WScript.Echo(fn);
  43.                     WshShell.Run(fn, 1, true);
  44.                 }
  45.             }
  46.         }
  47.         eFiles.moveNext();
  48.     }
  49. }