BenpHunter
Posts: 142
Score: 4 Joined: 1/6/2007 From: Microsoft New Zealand Status: offline
|
Here is a code sample for editing the system hive from within WinPE, hopefully this helps. 'Load System Hive sCmd = "cmd /c ""REG LOAD HKLM\TempHive " & Left(oUtility.LocalRootPath, 2) & "\windows\system32\config\system""" iRetVal = oShell.Run(sCmd, 0, true) If Err then oLogging.CreateEntry "USEREXIT: WARNING - Error loading system hive: " & Err.Description & " (" & Err.Number & ")", LogTypeWarning Else 'Change startup to disabled oShell.RegWrite "HKEY_LOCAL_MACHINE\TempHive\key\key", &H00000001, "REG_DWORD" 'Unload System Hive sCmd = "cmd /c ""REG UNLOAD HKLM\TempHive""" iRetVal = oShell.Run(sCmd, 0, true) oLogging.CreateEntry "USEREXIT: Loaded System Hive", LogTypeInfo End if Thanks, Ben Hunter
< Message edited by BenpHunter -- 2/22/2007 3:21:14 AM >
|