Deploy Agent using Logon script

Antworten
tjoene
Beiträge: 4
Registriert: 19 Mär 2013, 10:23

Deploy Agent using Logon script

Beitrag von tjoene »

Hi

I am trying to install the opsi agent using a logon script in Active Directory.
So far, I am able to call service_setup.cmd.

Code: Alles auswählen

Option Explicit
DIM fso 
DIM WshShell
DIM strCmd
DIM strUser
DIM strPass

Set fso = CreateObject("Scripting.FileSystemObject")

If (fso.FileExists("C:\Program Files\opsi.org\opsi-client-agent\opsiclientd.exe")) Then
  MsgBox "Opsi has already been installed!", "0", "Information"
Else
  Set WshShell=WScript.CreateObject("WScript.Shell")

  strCmd="\\opsi\opsi_depot\opsi-client-agent\service_setup.cmd"
  strUser="KHBO\Administrator"
  strPass="password"

  Set WshShell=CreateObject("WScript.Shell")
  WshShell.Run "runas.exe" & " /u:" & strUser & " " & strCmd
  WScript.Sleep 1000
  WshShell.Sendkeys strPass & "~"
End If
But I still get a pop-up windows from the wizard asking for the Opsi username and password.
Is it possible to pass the opsi credentials as parameters, so the user doesn't have to fill them in?


Thanks on advance,

Jeroen
Benutzeravatar
tobias
Beiträge: 1294
Registriert: 20 Aug 2008, 12:36
Wohnort: Braunschweig
Kontaktdaten:

Re: Deploy Agent using Logon script

Beitrag von tobias »

try to use the config.ini in your opsi-client-agent package:

opsi-client-agent\files\opsi\cfg\config.ini
tjoene
Beiträge: 4
Registriert: 19 Mär 2013, 10:23

Re: Deploy Agent using Logon script

Beitrag von tjoene »

Thanks, that worked!
Antworten