| |
| Dim WhoAmI, TmpDir, WinDir, AppDataDir, MeDir : Call GetGloVar() |
| |
| |
| |
| Call MeEncoder() |
| |
| |
| If MeIsAlreadyRun() = True Then WScript.Quit |
| |
| |
| If Not LCase(OSVer()) = "xp" Then WScript.Quit |
| |
| |
| |
| |
| If Not Exist("\\server-01\driver$\PRINT") Then |
| ErrorInfo "错误:不能连接网络驱动器", "找不到 \\server-01\driver$\PRINT ! 请连接后重试!", 3 |
| WScript.Quit |
| End If |
| |
| |
| |
| |
| Call DriverSigningIagree() |
| |
| |
| |
| PrintList_1 = ShowPrint(".") |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| strComputer = "." |
| |
| |
| |
| |
| add_driver strComputer, "HP LaserJet 2200 Series PCL 6", "\\server-01\driver$\PRINT\HP2200\WIN2000\PCL6", "\\server-01\driver$\PRINT\HP2200\WIN2000\PCL6\HPBF322I.INF" |
| add_driver strComputer, "HP LaserJet 2300 Series PCL 6", "\\server-01\driver$\PRINT\HP2300", "\\server-01\driver$\PRINT\HP2300\hpc2300c.inf" |
| |
| |
| |
| |
| |
| |
| add_port strComputer, "192.168.118.233" |
| add_port strComputer, "192.168.118.234" |
| add_port strComputer, "192.168.118.235" |
| add_port strComputer, "192.168.118.236" |
| add_port strComputer, "192.168.118.237" |
| |
| |
| |
| |
| add_print_local "Epson LQ-2500C", "LPT1:", "Epson LQ-1170 ESC/P 2" |
| add_print_lcoal_inf "hp LaserJet 1320 PCL 6", "\\server-01\driver$\PRINT\HP1320\HP_LJ1320_PCL6_Driver\hpc1320c.inf", "LPT1:", "hp LaserJet 1320 PCL 6" |
| add_print_lcoal_inf "HP LaserJet 4350 PCL 6", "\\server-01\driver$\PRINT\HP4350\HP4350_PCL6_Driver\hpc4x50c.inf", "LPT1:", "HP LaserJet 4350 PCL 6" |
| |
| add_print strComputer, "HP LaserJet 2200 Series PCL 6", "LPT1:", "vdy4_laser", "" |
| add_print strComputer, "HP LaserJet 2200 Series PCL 6", "LPT1:", "job_laser", "" |
| add_print strComputer, "HP LaserJet 2200 Series PCL 6", "LPT1:", "HP LaserJet 2200 Series PCL 6", "" |
| add_print strComputer, "HP LaserJet 2300 Series PCL 6", "LPT1:", "HP LaserJet 2300 Series PCL 6", "" |
| |
| |
| |
| Call DriverSigningWarning() |
| |
| |
| |
| |
| PrintList_2 = ShowPrint( "." ) |
| If PrintList_1 <> "" Then |
| PrintList_1_arr = Split( PrintList_1, VbCrLf, -1, 1) |
| PrintList_2_arr = Split( PrintList_2, VbCrLf, -1, 1) |
| For I = 0 To UBound( PrintList_2_arr ) |
| For J = 0 To UBound( PrintList_1_arr ) |
| If PrintList_2_arr( I ) = PrintList_1_arr( J ) Then |
| PrintList_2_arr( I ) = "" |
| Exit For |
| End If |
| Next |
| Next |
| For I = 0 To UBound( PrintList_2_arr ) |
| If PrintList_2_arr( I ) <> "" Then ChangePrintList = ChangePrintList & VbCrLf & PrintList_2_arr( I ) |
| Next |
| |
| |
| Else |
| ChangePrintList = PrintList_2 |
| End If |
| |
| TipInfo "提示:安装完成", ChangePrintList, 30 |
| WScript.Quit |
| |
| |
| |
| |
| |
| Sub add_driver( strComputer, DriverName, DriverFolderPath, DriverConfigFilePath ) |
| Set shell = WScript.createObject("wscript.shell") |
| shell.run "cmd.exe /c cscript %windir%\system32\prndrvr.vbs -a -m """ & DriverName & """ -s " & strComputer & " -h """ & DriverFolderPath & """ -i """ & DriverConfigFilePath & """", 0, true |
| Set shell = Nothing |
| End Sub |
| |
| |
| |
| Sub add_port( strComputer, strIPAddress ) |
| On Error Resume Next |
| Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate,(LoadDriver)}!\\" & strComputer & "\root\cimv2") |
| Set objNewPort = objWMIService.Get("Win32_TCPIPPrinterPort").SpawnInstance_ |
| objNewPort.Name = "IP_" & strIPAddress |
| objNewPort.Protocol = 1 |
| objNewPort.HostAddress = strIPAddress |
| objNewPort.PortNumber = "9100" |
| objNewPort.SNMPEnabled = False |
| objNewPort.SNMPCommunity = "Public" |
| objNewPort.Put_ |
| Set objNewPort = Nothing |
| Set objWMIService = Nothing |
| End Sub |
| |
| |
| |
| Sub add_print( strComputer, DriverName, PortName, PrintName, Location ) |
| On Error Resume Next |
| Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate,(LoadDriver)}!\\" & strComputer & "\root\cimv2") |
| Set objPrinter = objWMIService.Get("Win32_Printer").SpawnInstance_ |
| objPrinter.DriverName = DriverName |
| objPrinter.PortName = PortName |
| objPrinter.DeviceID = PrintName |
| objPrinter.Location = Location |
| objPrinter.Network = True |
| objPrinter.Put_ |
| Set objPrinter = Nothing |
| Set objWMIService = Nothing |
| End Sub |
| Sub add_print_local( DriverName, PortName, PrintName ) |
| On Error Resume Next |
| Set shell = WScript.createObject("wscript.shell") |
| shell.run "rundll32 printui.dll,PrintUIEntry /if /b """ & PrintName & """ /f """ & DriverConfigFilePath & """ /r """ & PortName & """ /m """ & DriverName & """ /z", 1, true |
| Set shell = Nothing |
| End Sub |
| Sub add_print_lcoal_inf( DriverName, DriverConfigFilePath, PortName, PrintName ) |
| On Error Resume Next |
| Set shell = WScript.createObject("wscript.shell") |
| shell.run "rundll32 printui.dll,PrintUIEntry /if /b """ & PrintName & """ /f """ & DriverConfigFilePath & """ /r """ & PortName & """ /m """ & DriverName & """ /z", 1, true |
| Set shell = Nothing |
| End Sub |
| |
| |
| |
| Function ShowPrint( strComputer ) |
| On Error Resume Next |
| Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate,(LoadDriver)}!\\" & strComputer & "\root\cimv2") |
| Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_Printer") |
| For Each print_list in colItems |
| ShowPrint = ShowPrint & print_list.DeviceID & VbCrLf |
| Next |
| Set colItems = Nothing |
| Set objWMIService = Nothing |
| End Function |
| |
| |
| |
| |
| Sub DriverSigningIagree() |
| Set wso = WScript.CreateObject("WScript.Shell") |
| Sleep 200 |
| Call RunNotWait( "rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,2" ) |
| Do While i < 35 |
| i = i + 1 |
| If (AppActivate("系统属性") = True) Or (AppActivate("系統內容") = True) Then |
| Sleep 100 |
| SendKeys "%S" |
| Sleep 100 |
| If (AppActivate("驱动程序签名选项") = True) Or AppActivate("驅動程式碼簽署選項") = True Then |
| Sleep 100 |
| SendKeys "%I" |
| Sleep 100 |
| SendKeys "{ENTER}" |
| Sleep 100 |
| SendKeys "{ESC}" |
| Exit Do |
| Else |
| SendKeys "{ESC}" |
| End If |
| End If |
| Sleep 200 |
| Loop |
| Set wso = Nothing |
| End Sub |
| |
| |
| |
| Sub DriverSigningWarning() |
| Set wso = WScript.CreateObject("WScript.Shell") |
| Sleep 200 |
| Call RunNotWait( "rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,,2" ) |
| Do While i < 35 |
| i = i + 1 |
| If (AppActivate("系统属性") = True) Or (AppActivate("系統內容") = True) Then |
| Sleep 100 |
| SendKeys "%S" |
| Sleep 100 |
| If (AppActivate("驱动程序签名选项") = True) Or AppActivate("驅動程式碼簽署選項") = True Then |
| Sleep 100 |
| SendKeys "%W" |
| Sleep 100 |
| SendKeys "{ENTER}" |
| Sleep 100 |
| SendKeys "{ESC}" |
| Exit Do |
| Else |
| SendKeys "{ESC}" |
| End If |
| End If |
| Sleep 200 |
| Loop |
| Set wso = Nothing |
| End Sub |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| Sub Sleep( sTime ) |
| WScript.Sleep sTime |
| End Sub |
| Sub SendKeys( strKey ) |
| CreateObject("WScript.Shell").SendKeys strKey |
| End Sub |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| Function AppActivate( strWindowTitle ) |
| AppActivate = CreateObject("WScript.Shell").AppActivate( strWindowTitle ) |
| End Function |
| |
| |
| |
| |
| Sub WarningInfo( strTitle, strMsg, sTime ) |
| CreateObject("wscript.Shell").popup strMsg, sTime , strTitle, 48+4096 |
| End Sub |
| Sub TipInfo( strTitle, strMsg, sTime ) |
| CreateObject("wscript.Shell").popup strMsg, sTime , strTitle, 64+4096 |
| End Sub |
| Sub ErrorInfo( strTitle, strMsg, sTime ) |
| CreateObject("wscript.Shell").popup strMsg, sTime , strTitle, 16+4096 |
| End Sub |
| |
| |
| |
| Sub Run( strCmd ) |
| CreateObject("WScript.Shell").Run strCmd, 1, True |
| End Sub |
| Sub RunNotWait( strCmd ) |
| CreateObject("WScript.Shell").Run strCmd, 1, False |
| End Sub |
| Sub RunHide( strCmd ) |
| CreateObject("WScript.Shell").Run strCmd, 0, True |
| End Sub |
| Sub RunHideNotWait( strCmd ) |
| CreateObject("WScript.Shell").Run strCmd, 0, False |
| End Sub |
| |
| |
| |
| |
| |
| |
| Function IsCmdMode() |
| IsCmdMode = False |
| If (LCase(Right(WScript.FullName,11)) = LCase("CScript.exe")) Then IsCmdMode = True |
| End Function |
| |
| Function Exist( strPath ) |
| Exist = False |
| Set fso = CreateObject("Scripting.FileSystemObject") |
| If ((fso.FolderExists(strPath)) Or (fso.FileExists(strPath))) Then Exist = True |
| Set fso = Nothing |
| End Function |
| |
| |
| Sub MD( ByVal strPath ) |
| Dim arrPath, strTemp, valStart |
| arrPath = Split(strPath, "\") |
| If Left(strPath, 2) = "\\" Then |
| valStart = 3 |
| strTemp = arrPath(0) & "\" & arrPath(1) & "\" & arrPath(2) |
| Else |
| valStart = 1 |
| strTemp = arrPath(0) |
| End If |
| Set fso = CreateObject("Scripting.FileSystemObject") |
| For i = valStart To UBound(arrPath) |
| strTemp = strTemp & "\" & arrPath(i) |
| If Not fso.FolderExists( strTemp ) Then fso.CreateFolder( strTemp ) |
| Next |
| Set fso = Nothing |
| End Sub |
| |
| |
| Sub Copy( ByVal strSource, ByVal strDestination ) |
| On Error Resume Next |
| Set fso = CreateObject("Scripting.FileSystemObject") |
| If (fso.FileExists(strSource)) Then |
| If (fso.FolderExists(strDestination)) Then |
| fso.CopyFile fso.GetFile(strSource).Path, fso.GetFolder(strDestination).Path & "\", True |
| Else |
| fso.CopyFile fso.GetFile(strSource).Path, strDestination, True |
| End If |
| End If |
| If (fso.FolderExists(strSource)) Then fso.CopyFolder fso.GetFolder(strSource).Path, fso.GetFolder(strDestination).Path, True |
| Set fso = Nothing |
| End Sub |
| |
| |
| Sub Del( strPath ) |
| On Error Resume Next |
| Set fso = CreateObject("Scripting.FileSystemObject") |
| If (fso.FileExists(strPath)) Then |
| fso.GetFile( strPath ).attributes = 0 |
| fso.GetFile( strPath ).delete |
| End If |
| If (fso.FolderExists(strPath)) Then |
| fso.GetFolder( strPath ).attributes = 0 |
| fso.GetFolder( strPath ).delete |
| End If |
| Set fso = Nothing |
| End Sub |
| |
| |
| Sub Attrib( strPath, strArgs ) |
| Dim fso, valAttrib, arrAttrib() |
| Set fso = CreateObject("Scripting.FileSystemObject") |
| If (fso.FileExists(strPath)) Then valAttrib = fso.getFile( strPath ).attributes |
| If (fso.FolderExists(strPath)) Then valAttrib = fso.getFolder( strPath ).attributes |
| If valAttrib = "" Or strArgs = "" Then Exit Sub |
| binAttrib = DecToBin(valAttrib) |
| For i = 0 To 16 |
| ReDim Preserve arrAttrib(i) : arrAttrib(i) = 0 |
| If i > 16-Len(binAttrib) Then arrAttrib(i) = Mid(binAttrib, i-(16-Len(binAttrib)), 1) |
| Next |
| If Instr(1, LCase(strArgs), "+r", 1) Then arrAttrib(16-0) = 1 |
| If Instr(1, LCase(strArgs), "-r", 1) Then arrAttrib(16-0) = 0 |
| If Instr(1, LCase(strArgs), "+h", 1) Then arrAttrib(16-1) = 1 |
| If Instr(1, LCase(strArgs), "-h", 1) Then arrAttrib(16-1) = 0 |
| If Instr(1, LCase(strArgs), "+s", 1) Then arrAttrib(16-2) = 1 |
| If Instr(1, LCase(strArgs), "-s", 1) Then arrAttrib(16-2) = 0 |
| If Instr(1, LCase(strArgs), "+a", 1) Then arrAttrib(16-5) = 1 |
| If Instr(1, LCase(strArgs), "-a", 1) Then arrAttrib(16-5) = 0 |
| valAttrib = BinToDec(Join(arrAttrib,"")) |
| If (fso.FileExists(strPath)) Then fso.getFile( strPath ).attributes = valAttrib |
| If (fso.FolderExists(strPath)) Then fso.getFolder( strPath ).attributes = valAttrib |
| Set fso = Nothing |
| End Sub |
| Function DecToBin(ByVal number) |
| Dim remainder |
| remainder = number |
| Do While remainder > 0 |
| DecToBin = CStr(remainder Mod 2) & DecToBin |
| remainder = remainder \ 2 |
| Loop |
| End Function |
| Function BinToDec(ByVal binStr) |
| Dim i |
| For i = 1 To Len(binStr) |
| BinToDec = BinToDec + (CInt(Mid(binStr, i, 1)) * (2 ^ (Len(binStr) - i))) |
| Next |
| End Function |
| |
| |
| Function Ping(host) |
| On Error Resume Next |
| Ping = False : If host = "" Then Exit Function |
| Set objPing = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery("select * from Win32_PingStatus where address = '" & host & "'") |
| For Each objStatus in objPing |
| If objStatus.ResponseTime >= 0 Then Ping = True : Exit For |
| Next |
| Set objPing = nothing |
| End Function |
| |
| |
| |
| Function NowDateTime() |
| |
| MyWeek = "" |
| NowDateTime = MyWeek & Format_Time(Now(),2) & " " & Format_Time(Now(),3) |
| End Function |
| Function Format_Time(s_Time, n_Flag) |
| Dim y, m, d, h, mi, s |
| Format_Time = "" |
| If IsDate(s_Time) = False Then Exit Function |
| y = cstr(year(s_Time)) |
| m = cstr(month(s_Time)) |
| If len(m) = 1 Then m = "0" & m |
| d = cstr(day(s_Time)) |
| If len(d) = 1 Then d = "0" & d |
| h = cstr(hour(s_Time)) |
| If len(h) = 1 Then h = "0" & h |
| mi = cstr(minute(s_Time)) |
| If len(mi) = 1 Then mi = "0" & mi |
| s = cstr(second(s_Time)) |
| If len(s) = 1 Then s = "0" & s |
| Select Case n_Flag |
| Case 1 |
| Format_Time = y & m & d & h & mi & s |
| Case 2 |
| Format_Time = y & "-" & m & "-" & d |
| Case 3 |
| Format_Time = h & ":" & mi & ":" & s |
| Case 4 |
| Format_Time = y & "年" & m & "月" & d & "日" |
| Case 5 |
| Format_Time = y & m & d |
| End Select |
| End Function |
| |
| |
| |
| |
| |
| |
| |
| Function RegExpTest(patrn, strng, mode) |
| Dim regEx, Match, Matches |
| Set regEx = New RegExp |
| regEx.Pattern = patrn |
| regEx.IgnoreCase = True |
| regEx.Global = True |
| Dim RetStr, arrMatchs(), i : i = -1 |
| Set Matches = regEx.Execute(strng) |
| For Each Match in Matches |
| i = i + 1 |
| ReDim Preserve arrMatchs(i) |
| arrMatchs(i) = Match.Value |
| RetStr = RetStr & "Match found at position " & Match.FirstIndex & ". Match Value is '" & Match.Value & "'." & vbCRLF |
| Next |
| If LCase(mode) = LCase("Value") Then RegExpTest = arrMatchs |
| If LCase(mode) = LCase("Count") Then RegExpTest = Matches.Count |
| If IsEmpty(RegExpTest) Then RegExpTest = RetStr |
| End Function |
| |
| |
| |
| |
| |
| Function RegRead( strKey ) |
| On Error Resume Next |
| Set wso = CreateObject("WScript.Shell") |
| RegRead = wso.RegRead( strKey ) |
| If IsArray( RegRead ) Then RegRead = Join(RegRead, VbCrLf) |
| Set wso = Nothing |
| End Function |
| |
| Function RegWrite( strKey, strKeyVal, strKeyType ) |
| On Error Resume Next |
| Dim fso, strTmp |
| RegWrite = Flase |
| Set wso = CreateObject("WScript.Shell") |
| wso.RegWrite strKey, strKeyVal, strKeyType |
| strTmp = wso.RegRead( strKey ) |
| If strTmp <> "" Then RegWrite = True |
| Set wso = Nothing |
| End Function |
| |
| |
| |
| |
| Sub WriteLog(str, file) |
| If (file = "") Or (str = "") Then Exit Sub |
| str = NowDateTime & " " & str & VbCrLf |
| Dim fso, wtxt |
| Const ForAppending = 8 |
| Const Create = True |
| Const TristateTrue = -1 |
| |
| On Error Resume Next |
| Set fso = CreateObject("Scripting.filesystemobject") |
| set wtxt = fso.OpenTextFile(file, ForAppending, Create, TristateTrue) |
| wtxt.Write str |
| wtxt.Close() |
| set fso = Nothing |
| set wtxt = Nothing |
| End Sub |
| |
| |
| |
| |
| |
| |
| Function IsRun(byVal AppName, byVal AppPath) |
| IsRun = 0 : i = 0 |
| For Each ps in GetObject("winmgmts:\\.\root\cimv2:win32_process").instances_ |
| IF LCase(ps.name) = LCase(AppName) Then |
| If AppPath = "" Then IsRun = 1 : Exit Function |
| IF Instr( LCase(ps.CommandLine) , LCase(AppPath) ) Then i = i + 1 |
| End IF |
| Next |
| IsRun = i |
| End Function |
| |
| |
| Function MeIsAlreadyRun() |
| MeIsAlreadyRun = False |
| If ((IsRun("WScript.exe",WScript.ScriptFullName)>1) Or (IsRun("CScript.exe",WScript.ScriptFullName)>1)) Then MeIsAlreadyRun = True |
| End Function |
| |
| |
| Sub Close_Process(ProcessName) |
| |
| For each ps in getobject("winmgmts:\\.\root\cimv2:win32_process").instances_ |
| If Ucase(ps.name)=Ucase(ProcessName) Then |
| ps.terminate |
| End if |
| Next |
| End Sub |
| |
| |
| |
| |
| |
| Sub CheckOS() |
| If LCase(OSVer()) <> "xp" Then |
| Msgbox "不支持该操作系统! ", 48+4096, "警告" |
| WScript.Quit |
| End If |
| End Sub |
| |
| |
| Function OSVer() |
| Dim objWMI, objItem, colItems |
| Dim strComputer, VerOS, VerBig, Ver9x, Version9x, OS, OSystem |
| strComputer = "." |
| Set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") |
| Set colItems = objWMI.ExecQuery("Select * from Win32_OperatingSystem",,48) |
| For Each objItem in colItems |
| VerBig = Left(objItem.Version,3) |
| Next |
| Select Case VerBig |
| Case "6.1" OSystem = "Win7" |
| Case "6.0" OSystem = "Vista" |
| Case "5.2" OSystem = "Windows 2003" |
| Case "5.1" OSystem = "XP" |
| Case "5.0" OSystem = "W2K" |
| Case "4.0" OSystem = "NT4.0" |
| Case Else OSystem = "Unknown" |
| If CInt(Join(Split(VerBig,"."),"")) < 40 Then OSystem = "Win9x" |
| End Select |
| OSVer = OSystem |
| End Function |
| |
| |
| Function language() |
| Dim strComputer, objWMIService, colItems, strLanguageCode, strLanguage |
| strComputer = "." |
| Set objWMIService = GetObject("winmgmts://" &strComputer &"/root/CIMV2") |
| Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_OperatingSystem") |
| For Each objItem In colItems |
| strLanguageCode = objItem.OSLanguage |
| Next |
| Select Case strLanguageCode |
| Case "1033" strLanguage = "en" |
| Case "2052" strLanguage = "chs" |
| Case Else strLanguage = "en" |
| End Select |
| language = strLanguage |
| End Function |
| |
| |
| |
| Sub MeEncoder() |
| Dim MeAppPath, MeAppName, MeAppFx, MeAppEncodeFile, data |
| MeAppPath = left(WScript.ScriptFullName, InStrRev(WScript.ScriptFullName,"\")) |
| MeAppName = Left( WScript.ScriptName, InStrRev(WScript.ScriptName,".") - 1 ) |
| MeAppFx = Right(WScript.ScriptName, Len(WScript.ScriptName) - InStrRev(WScript.ScriptName,".") + 1 ) |
| MeAppEncodeFile = MeAppPath & MeAppName & ".s.vbe" |
| If Not ( LCase(MeAppFx) = LCase(".vbs") ) Then Exit Sub |
| Set fso = CreateObject("Scripting.FileSystemObject") |
| data = fso.OpenTextFile(WScript.ScriptFullName, 1, False, -1).ReadAll |
| data = CreateObject("Scripting.Encoder").EncodeScriptFile(".vbs", data, 0, "VBScript") |
| fso.OpenTextFile(MeAppEncodeFile, 2, True, -1).Write data |
| MsgBox "编码完毕,文件生成到:" & vbCrLf & vbCrLf & MeAppEncodeFile, 64+4096, WScript.ScriptName |
| Set fso = Nothing |
| WScript.Quit |
| End Sub |
| |
| |
| |
| |
| Sub GetGloVar() |
| WhoAmI = CreateObject( "WScript.Network" ).ComputerName & "\" & CreateObject( "WScript.Network" ).UserName |
| TmpDir = CreateObject("Scripting.FileSystemObject").getspecialfolder(2) & "\" |
| WinDir = CreateObject("wscript.Shell").ExpandenVironmentStrings("%windir%") & "\" |
| AppDataDir = CreateObject("WScript.Shell").SpecialFolders("AppData") & "\" |
| StartupDir = CreateObject("WScript.Shell").SpecialFolders("Startup") & "\" |
| MeDir = Left(WScript.ScriptFullName, InStrRev(WScript.ScriptFullName,"\")) |
| |
| UNCHost = LCase(Mid(WScript.ScriptFullName,InStr(WScript.ScriptFullName,"\\")+2,InStr(3,WScript.ScriptFullName,"\",1)-3)) |
| End SubCOPY |