könnten Sie die SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce
Schlüssel
verwenden
Diese VB script helfen könnte. Auszug:
workfile = ifile.ReadLine
strcomputer = ucase(left(workfile,instr(workfile,",")-1))
Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strcomputer & "\root\default:StdRegProv")
if err.number <> 0 then
ofile.WriteLine "[" & now() & "] " & strcomputer & " will NOT run once. Failed to set runonce install with error: " & Err.Number & "/" & left(Err.Description,17)
else
sKeyPathEnv = "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce"
sValueName = "Set_RunOnce"
sKeyPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion"
sValueName = "SystemRoot"
oReg.GetExpandedStringValue HKLM, sKeyPath, sValueName, sSystemRoot
oReg.SetStringValue HKLM, sKeyPathEnv, "Set_RunOnce", vRunOnce
if Err.Number <> 0 then
ofile.WriteLine "[" & now() & "] " & strcomputer & " will NOT run once. Failed to set runonce install with error: " & Err.Number & "/" & left(Err.Description,17)
else
ofile.WriteLine "[" & now() & "] " & strcomputer & " will run once via runonce at next reboot. "
end if
end if
Welche Windows-Versionen muss es arbeiten? –
XP, für jetzt. – paxdiablo