Mugatu Posted August 3, 2004 Posted August 3, 2004 i want to enable APM automatically during my unattended Windows 2000 install. it's the only thing i haven't yet figured out. i'm pretty sure this is what needs to go in the registry:Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\ApmActive] "Active"=dword:00000001 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ApmActive] "Active"=dword:00000001 [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Hardware Profiles\0001\System\CurrentControlSet\Enum\ROOT\NTAPM] [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Hardware Profiles\0001\System\CurrentControlSet\Enum\ROOT\NTAPM\0000] [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Hardware Profiles\Current\System\CurrentControlSet\Enum\ROOT\NTAPM] [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Hardware Profiles\Current\System\CurrentControlSet\Enum\ROOT\NTAPM\0000] [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\0001\System\CurrentControlSet\Enum\ROOT\NTAPM] [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\0001\System\CurrentControlSet\Enum\ROOT\NTAPM\0000] [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Enum\ROOT\NTAPM] [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Enum\ROOT\NTAPM\0000] [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\NTAPM\0000\Control] "ActiveService"="NtApm"Windows has a problem with those last 2 lines every time:Cannot import apm.reg: Not all data was successfully written to the registry. Some keys are open by the system or other processes.i first tried putting that registry key in during RunOnceEx. didn't work. then i tried cmdlines.txt--no luck. then i tried [GuiRunOnce] in winnt.sif. didn't even work then. i've tried playing around with other options, but i can't figure out how to simply enable apm using the command line. apparently Windoze treats it as a service named NTAPM, but normal commands like net start ntapm won't work:The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.The only way i can manage to get apm working is to check the box in the APM tab of power properties in the display control. i'd love to have it automatically work though as i have to set up quite a few computers every day. any suggestions?
Denney Posted August 9, 2004 Posted August 9, 2004 I'd like to know this to. I'm using Windows XP SP2 final.I haven't tried the registry file yet. I'm going to try that now. I will post and let you know how it went.Edit: I don't think you need the ControlSet001 lines.
Denney Posted August 9, 2004 Posted August 9, 2004 I was able to enable APM using the following INF file (or you could convert it to a reg file if you so desire):[APM.AddReg]; Enable Advanced Power Management.HKLM,"SYSTEM\CurrentControlSet\Control\ApmActive",Active,%REG_DWORD%,%ON%HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Enum\ROOT\NTAPM\0000"HKLM,"SYSTEM\CurrentControlSet\Enum\Root\NTAPM\0000",ConfigFlags,%REG_DWORD%,%OFF%HKLM,"SYSTEM\CurrentControlSet\Enum\Root\NTAPM\0000\Control",ActiveService,%REG_SZ%,"NtApm"Note: This is Windows XP SP2 for anyone who is interested.
devil270975 Posted August 9, 2004 Posted August 9, 2004 i use this under cmdlines.txt and it workscmdlines.txt[COMMANDS] ".\Setup.cmd"setup.cmdCLS @ECHO OFF REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\ApmActive" /VE /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\ApmActive" /V "Active" /T REG_DWORD /D 00000001 /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Hardware Profiles\0001\System\CurrentControlSet\Enum\ROOT\NTAPM" /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Hardware Profiles\0001\System\CurrentControlSet\Enum\ROOT\NTAPM\0000" /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Hardware Profiles\Current\System\CurrentControlSet\Enum\ROOT\NTAPM" /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Hardware Profiles\Current\System\CurrentControlSet\Enum\ROOT\NTAPM\0000" /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ApmActive" /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ApmActive" /V "Active" /T REG_DWORD /D 00000001 /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\0001\System\CurrentControlSet\Enum\ROOT\NTAPM" /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\0001\System\CurrentControlSet\Enum\ROOT\NTAPM\0000" /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Enum\ROOT\NTAPM" /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Enum\ROOT\NTAPM\0000" /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\NTAPM\0000\Control" /V "ActiveService" /D "NtApm" /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\NTAPM\0000\Control" /V "ActiveService" /D "NtApm" /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\NTAPM\0000" /V "ConfigFlags" /T REG_DWORD /D 00000000 /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\NTAPM\0000" /V "ConfigFlags" /T REG_DWORD /D 00000000 /F > NULEXIThope this helps
Mugatu Posted August 18, 2004 Author Posted August 18, 2004 i use this under cmdlines.txt and it workscmdlines.txt[COMMANDS] ".\Setup.cmd"setup.cmdCLS @ECHO OFF REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\ApmActive" /VE /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\ApmActive" /V "Active" /T REG_DWORD /D 00000001 /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Hardware Profiles\0001\System\CurrentControlSet\Enum\ROOT\NTAPM" /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Hardware Profiles\0001\System\CurrentControlSet\Enum\ROOT\NTAPM\0000" /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Hardware Profiles\Current\System\CurrentControlSet\Enum\ROOT\NTAPM" /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Hardware Profiles\Current\System\CurrentControlSet\Enum\ROOT\NTAPM\0000" /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ApmActive" /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ApmActive" /V "Active" /T REG_DWORD /D 00000001 /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\0001\System\CurrentControlSet\Enum\ROOT\NTAPM" /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\0001\System\CurrentControlSet\Enum\ROOT\NTAPM\0000" /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Enum\ROOT\NTAPM" /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Enum\ROOT\NTAPM\0000" /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\NTAPM\0000\Control" /V "ActiveService" /D "NtApm" /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\NTAPM\0000\Control" /V "ActiveService" /D "NtApm" /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\NTAPM\0000" /V "ConfigFlags" /T REG_DWORD /D 00000000 /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\NTAPM\0000" /V "ConfigFlags" /T REG_DWORD /D 00000000 /F > NULEXIThope this helpsis everyone that replied that they were able to get APM enabled during install using Windows XP? i think part of my problem might be the fact that i'm using Windows 2000. i'm pretty sure the lines i need to put in the registry that will enable APM is:[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Enum\ROOT\NTAPM\0000][HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\NTAPM\0000\Control]"ActiveService"="NtApm"cause those are some of the lines that are changed when i manually enable APM. but i'm having trouble with these lines, cause they keep giving me the error:Cannot import apm.reg: Not all data was successfully written to the registry. Some keys are open by the system or other processes.all of these commands:"HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\NTAPM\0000\Control" /V "ActiveService" /D "NtApm" /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\NTAPM\0000\Control" /V "ActiveService" /D "NtApm" /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\NTAPM\0000" /V "ConfigFlags" /T REG_DWORD /D 00000000 /F > NULREG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\NTAPM\0000" /V "ConfigFlags" /T REG_DWORD /D 00000000 /F > NULgive me the error:Error: Access is denied.honestly i think some of these aren't even necessary in Windows 2000 as these keys don't exist. my problem is the fact that these registry keys seem to be locked and so i cannot import the information in them. i've tried doing it during safe mode, as well as during my unattended install during RunOnceEx, cmdlines.txt, and [GuiRunOnce] in winnt.sif, but no luck. any other suggestions? has anyone using Windows 2000 had any success with this?
germ Posted September 2, 2004 Posted September 2, 2004 I was able to enable APM using the following INF file (or you could convert it to a reg file if you so desire):[APM.AddReg]; Enable Advanced Power Management.HKLM,"SYSTEM\CurrentControlSet\Control\ApmActive",Active,%REG_DWORD%,%ON%HKLM,"SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Enum\ROOT\NTAPM\0000"HKLM,"SYSTEM\CurrentControlSet\Enum\Root\NTAPM\0000",ConfigFlags,%REG_DWORD%,%OFF%HKLM,"SYSTEM\CurrentControlSet\Enum\Root\NTAPM\0000\Control",ActiveService,%REG_SZ%,"NtApm"Note: This is Windows XP SP2 for anyone who is interested.how can i added this inf to my registry??a *reg isnt a problem,but i dont know how i added reg entries from a inf file.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now