0

Im adding a logon script to a GPO to install a program for me. Can anyone see a problem with this script? When the PC boots it comes up saying that it can find the resource?

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
Zoredache
  • 130,897
  • 41
  • 276
  • 420

1 Answers1

1

At first glance: the UNC path needs to start with two backslashes, i.e.:

 strApp = "cmd /c \\int.company.com\sysvol\... 

It appears that only a single backslash is used above.

Skyhawk
  • 14,200
  • 4
  • 53
  • 95