
Estou adicionando um script de logon a um GPO para instalar um programa para mim. Alguém pode ver algum problema com este script? Quando o PC inicializa aparece dizendo que consegue encontrar o recurso?
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
Responder1
À primeira vista: o caminho UNC precisa começar com duas barras invertidas, ou seja:
strApp = "cmd /c \\int.company.com\sysvol\...
Parece que apenas uma única barra invertida é usada acima.