
Ich füge einem GPO ein Anmeldeskript hinzu, um ein Programm für mich zu installieren. Kann irgendjemand ein Problem mit diesem Skript erkennen? Wenn der PC hochfährt, wird angezeigt, dass er die Ressource finden kann?
Const EVENT_SUCCESS = 0
On Error Resume Next
strPlugin = "HKLM\Software\BottomlineTechnologies\TransformInstallationSystem\CurrentInstallPath"
strApp = "cmd /c \\int.company.com\sysvol\int.company.com\scripts\Apps\setup.exe installpath selectall autoexit hide"
Set WSHShell = CreateObject("WScript.Shell")
sReg = WSHShell.RegRead(strPlugin)
If Err.Number <> 0 Then
Err.Clear
'Plugin not yet installed
WSHShell.Run strApp, 0, true
WSHShell.LogEvent EVENT_SUCCESS, "InstalledPlugin"
Else
WSHShell.LogEvent EVENT_SUCCESS, "Plugin already installed."
End If
WScript.Quit
Antwort1
Auf den ersten Blick: Der UNC-Pfad muss mit zwei Backslashes beginnen, also:
strApp = "cmd /c \\int.company.com\sysvol\...
Es scheint, dass oben nur ein einzelner Backslash verwendet wird.