
Estoy agregando una secuencia de comandos de inicio de sesión a un GPO para instalar un programa por mí. ¿Alguien puede ver un problema con este script? Cuando la PC arranca, aparece diciendo que puede encontrar el 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
Respuesta1
A primera vista: la ruta UNC debe comenzar con dos barras invertidas, es decir:
strApp = "cmd /c \\int.company.com\sysvol\...
Parece que arriba solo se usa una barra invertida.