Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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
share|improve this question
    
The GP is a computer install not user. –  user50966 Aug 12 '10 at 8:02

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
Yeah that was just me editing the post wrong in here. –  user50966 Aug 13 '10 at 4:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.