Dieses Skript soll über den Windows Registry Key: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon
alle Maschinen automatisch anmelden.
Da ich immer alle Clients im Kundennetz sonst immer manuell anmelden muss.
Nun habe ich aber ein Problem, wenn ich den Code im OPSI ausführe:
Code: Alles auswählen
[Actions]
requiredWinstVersion >= "4.10.8"
SetLogLevel = 7
DefVar $ProductId$
;Property-Werte
DefVar $domain$
DefVar $domainuser$
DefVar $domainpassword$
set $ProductId$ = "AutoLogin"
;Property-Werte
Set $domain$ = GetProductProperty("domain","PAEDML-LINUX")
Set $domainuser$ = GetProductProperty("domainuser","Administrator")
Set $domainpassword$ = GetProductProperty("domainpassword","")
Registry_Winlogin
DosBatch_shutdown
Message "Install "+$ProductId$+" ..."
[Registry_Winlogin]
OpenKey [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon]
set "AutoAdminLogon"=REG_DWORD:00000001
set "DefaultPassword"=REG_SZ:"$domainpassword$"
set "DefaultUserName"=REG_SZ:"$domain$\$domainuser$"
[DosBatch_shutdown]
@echo off
shutdown -r -t 0
https://imgur.com/hnzo4lP
Doch leider werden die Clients nicht automatisch angemeldet.
Wenn ich dies jedoch mit einem Batch-Skript nach baue und ausführe funktioniert alles ohne weitere Probleme.
Meine Frage:
- Warum schluckt OPSI die Registrierungseintrtäge nicht richtig?