Код:

$sKey = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx"
$aDrives = DriveGetDrive("CDROM")
For $i=1 To $aDrives[0]
If FileExists($aDrives[$i] &"\WIN51") Then $sDVD = $aDrives[$i]
Next
RegWrite($sKey &"\910", "1", "REG_SZ","REGEDIT /S "& $sDVD &"\$OEM$\HKLM.reg")
RegWrite($sKey &"\920", "1", "REG_SZ", "hidcon.exe Shutdown -r -f -t 0")
RegWrite($sKey &"\999", "1", "REG_SZ", $sDVD &"\WPI\WPI.hta")