MSFN Forum: way to enable APM during windows install? - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

way to enable APM during windows install? Rate Topic: -----

#1 User is offline   Mugatu 

  • Group: Members
  • Posts: 7
  • Joined: 26-July 04

  Posted 03 August 2004 - 07:20 AM

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?


#2 User is offline   Denney 

  • *shrug*
  • PipPipPipPip
  • Group: Members
  • Posts: 685
  • Joined: 11-September 03

Posted 09 August 2004 - 01:32 AM

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.

#3 User is offline   Denney 

  • *shrug*
  • PipPipPipPip
  • Group: Members
  • Posts: 685
  • Joined: 11-September 03

Posted 09 August 2004 - 03:55 AM

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.

#4 User is offline   devil270975 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 368
  • Joined: 31-July 03

Posted 09 August 2004 - 04:05 AM

i use this under cmdlines.txt and it works

cmdlines.txt
[COMMANDS] 
".\Setup.cmd"


setup.cmd
CLS 
@ECHO OFF 
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\ApmActive" /VE /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\ApmActive" /V "Active" /T REG_DWORD /D 00000001 /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Hardware Profiles\0001\System\CurrentControlSet\Enum\ROOT\NTAPM" /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Hardware Profiles\0001\System\CurrentControlSet\Enum\ROOT\NTAPM\0000" /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Hardware Profiles\Current\System\CurrentControlSet\Enum\ROOT\NTAPM" /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Hardware Profiles\Current\System\CurrentControlSet\Enum\ROOT\NTAPM\0000" /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ApmActive" /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ApmActive" /V "Active" /T REG_DWORD /D 00000001 /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\0001\System\CurrentControlSet\Enum\ROOT\NTAPM" /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\0001\System\CurrentControlSet\Enum\ROOT\NTAPM\0000" /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Enum\ROOT\NTAPM" /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Enum\ROOT\NTAPM\0000" /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\NTAPM\0000\Control" /V "ActiveService" /D "NtApm" /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\NTAPM\0000\Control" /V "ActiveService" /D "NtApm" /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\NTAPM\0000" /V "ConfigFlags" /T REG_DWORD /D 00000000 /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\NTAPM\0000" /V "ConfigFlags" /T REG_DWORD /D 00000000 /F > NUL

EXIT

hope this helps

#5 User is offline   Mugatu 

  • Group: Members
  • Posts: 7
  • Joined: 26-July 04

Posted 18 August 2004 - 10:31 AM

devil270975, on Aug 9 2004, 04:05 AM, said:

i use this under cmdlines.txt and it works

cmdlines.txt
[COMMANDS] 
".\Setup.cmd"


setup.cmd
CLS 
@ECHO OFF 
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\ApmActive" /VE /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\ApmActive" /V "Active" /T REG_DWORD /D 00000001 /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Hardware Profiles\0001\System\CurrentControlSet\Enum\ROOT\NTAPM" /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Hardware Profiles\0001\System\CurrentControlSet\Enum\ROOT\NTAPM\0000" /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Hardware Profiles\Current\System\CurrentControlSet\Enum\ROOT\NTAPM" /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Hardware Profiles\Current\System\CurrentControlSet\Enum\ROOT\NTAPM\0000" /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ApmActive" /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ApmActive" /V "Active" /T REG_DWORD /D 00000001 /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\0001\System\CurrentControlSet\Enum\ROOT\NTAPM" /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\0001\System\CurrentControlSet\Enum\ROOT\NTAPM\0000" /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Enum\ROOT\NTAPM" /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Enum\ROOT\NTAPM\0000" /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\NTAPM\0000\Control" /V "ActiveService" /D "NtApm" /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\NTAPM\0000\Control" /V "ActiveService" /D "NtApm" /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\NTAPM\0000" /V "ConfigFlags" /T REG_DWORD /D 00000000 /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\NTAPM\0000" /V "ConfigFlags" /T REG_DWORD /D 00000000 /F > NUL

EXIT

hope this helps

is 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:

Quote

"HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\NTAPM\0000\Control" /V "ActiveService" /D "NtApm" /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\NTAPM\0000\Control" /V "ActiveService" /D "NtApm" /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\Root\NTAPM\0000" /V "ConfigFlags" /T REG_DWORD /D 00000000 /F > NUL
REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\NTAPM\0000" /V "ConfigFlags" /T REG_DWORD /D 00000000 /F > NUL


give 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?

#6 User is offline   germ 

  • Group: Members
  • Posts: 7
  • Joined: 28-July 04

Posted 02 September 2004 - 04:15 AM

RaveRod, on Aug 9 2004, 03:55 AM, said:

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.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy