Run Script based on Hardware Profile

  • Thread starter Thread starter TJM
  • Start date Start date
T

TJM

I looking for a way to conditionally run a script at
startup based on the hardware profile. Basically, I have
an application that runs from the startup folder, however
I only want it to run when I'm in a particular hardware
profile. I can do just about anything in a command
script, however I've not been able to find a way to
determine from the command line what Hardware profile the
machine is currently running under.

I do have methods for pulling registry info from the
command line, so if there is something in the registry
that would tell me which H/W profile is active, that
information would help. Any other ideas anyone can think
of for how I could achieve this functionality would be
appreciated.

Thanks,
-TJ
 
TJM said:
I looking for a way to conditionally run a script at
startup based on the hardware profile. Basically, I have
an application that runs from the startup folder, however
I only want it to run when I'm in a particular hardware
profile. I can do just about anything in a command
script, however I've not been able to find a way to
determine from the command line what Hardware profile the
machine is currently running under.

I do have methods for pulling registry info from the
command line, so if there is something in the registry
that would tell me which H/W profile is active, that
information would help. Any other ideas anyone can think
of for how I could achieve this functionality would be
appreciated.

Thanks,
-TJ

Yep -
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\IDConfigDB | CurrentConfig
This value tells you which h/w profile is active

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\IDConfigDB\Hardware Profiles

Has a friendly name on it.... so you know which one it is loading

Andy

[www.etjsolutions.co.uk]
 
Excellent, that nailed it. Thank you.

-T
-----Original Message-----
"TJM" <[email protected]> wrote in message
I looking for a way to conditionally run a script at
startup based on the hardware profile. Basically, I have
an application that runs from the startup folder, however
I only want it to run when I'm in a particular hardware
profile. I can do just about anything in a command
script, however I've not been able to find a way to
determine from the command line what Hardware profile the
machine is currently running under.

I do have methods for pulling registry info from the
command line, so if there is something in the registry
that would tell me which H/W profile is active, that
information would help. Any other ideas anyone can think
of for how I could achieve this functionality would be
appreciated.

Thanks,
-TJ

Yep -
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\IDConf igDB | CurrentConfig
This value tells you which h/w profile is active

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\IDConf igDB\Hardware Profiles

Has a friendly name on it.... so you know which one it is loading

Andy

[www.etjsolutions.co.uk]
.
 
Back
Top