[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/se3-unattended/var/se3/unattended/install/bin/ -> mapcd.js (source)

   1  if (WScript.Arguments.Length < 2) {
   2    WScript.Echo("Mount CD with unattended to required drive letter\n"+
   3                 "Example: mapcd.js \\dosbin\\install.pl w:");
   4    WScript.Quit(1);
   5  }
   6  var WshShell = WScript.CreateObject("WScript.Shell");
   7  var fso = WScript.CreateObject("Scripting.FileSystemObject");
   8  var wmi = GetObject("winmgmts:");
   9  var disks = wmi.InstancesOf("Win32_CDROMDrive");
  10  var e = new Enumerator(disks);
  11  for (;!e.atEnd();e.moveNext())
  12  {
  13    var x = e.item();
  14    if (x.MediaLoaded) {
  15      if (fso.FileExists(x.Drive + "\\" + WScript.Arguments(0))) {
  16        WshShell.Run("subst "+WScript.Arguments(1) + " " + x.Drive + "\\");
  17        var WshSysEnv = WshShell.Environment("SYSTEM");
  18        var SystemDrive = WshSysEnv("SystemDrive");
  19        var setzpath = fso.CreateTextFile(SystemDrive+"\\netinst\\setzpath.bat", true);
  20        setzpath.WriteLine("SET Z_PATH="+x.Drive);
  21        setzpath.Close();
  22      }
  23    }
  24  }
  25  WScript.Quit(1);


Generated: Tue Mar 17 22:47:18 2015 Cross-referenced by PHPXref 0.7.1