[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
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);
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Tue Mar 17 22:47:18 2015 | Cross-referenced by PHPXref 0.7.1 |