| View previous topic :: View next topic |
| Author |
Message |
AHKPNH
Joined: 17 Feb 2006 Posts: 35
|
Posted: Sat Jun 10, 2006 10:04 pm Post subject: How to detect a specific registry key? |
|
|
Suppose i want this key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Extensions
Is there a way to quick detect on user's pc the above key?
Thanks. |
|
| Back to top |
|
 |
Veovis
Joined: 13 Feb 2006 Posts: 390 Location: Utah
|
Posted: Sat Jun 10, 2006 11:39 pm Post subject: |
|
|
I use the registry "doc" within the folder you specified, and got this code:
| Code: | RegRead, OutputVar, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Extensions,doc
if errorlevel
msgbox, The registry `n`nHKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Extensions\doc`n`n does not exist.
else
msgbox, The registry exists. |
I remember someone on the forum mentioning that they found a way to check if a registry excists. Im going to go search for it. _________________
"Power can be given overnight, but responsibility must be taught. Long years go into its making." |
|
| Back to top |
|
 |
Veovis
Joined: 13 Feb 2006 Posts: 390 Location: Utah
|
Posted: Sat Jun 10, 2006 11:42 pm Post subject: |
|
|
found it
I searched for "registry excists"
http://www.autohotkey.com/forum/viewtopic.php?t=10349&highlight=registry+excists
if you tried to search but just used the wrong words, ignore this next comment, but if you didnt even search then try that next time first _________________
"Power can be given overnight, but responsibility must be taught. Long years go into its making." |
|
| Back to top |
|
 |
AHKPNH
Joined: 17 Feb 2006 Posts: 35
|
Posted: Sun Jun 11, 2006 3:38 pm Post subject: |
|
|
Thanks Veonis.
I'll check both and see... |
|
| Back to top |
|
 |
"Veonis" Guest
|
Posted: Sun Jun 11, 2006 10:04 pm Post subject: |
|
|
Gah! Why can no one spell my name right? I have been called all kinds of things. Veolis, Voivs, and now Veonis. But dont worry about it AHKHNP i guess it can happen to anyone  |
|
| Back to top |
|
 |
AHKPNH
Joined: 17 Feb 2006 Posts: 35
|
Posted: Sun Jun 11, 2006 10:36 pm Post subject: |
|
|
Sorry for the mistake Veovis.
You see, i am from Greece. the letter {v} for us it's like {n} in english, that is why I wrote "Veonis" and not Veovis...
You may ask why not mistake the first letter V, Well it's capital and .....
Anyway thanks for replying to my messages... I want to ask you something about the first question.
| Quote: | | Is there a way to quick detect on user's pc the above key? |
Let's suppose I have installed windows 2000 and changed the [windows] folder to [win] the key
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Extensions
would now be
HKEY_CURRENT_USER\Software\Microsoft\Win\CurrentVersion\Extensions
or the same?
Because in that case it is useless to search for a specific key since the path may differs from computer to computer.
So what I finally want is to find the path for the (Let's say --Extensions--) key |
|
| Back to top |
|
 |
evl
Joined: 24 Aug 2005 Posts: 1238
|
Posted: Sun Jun 11, 2006 10:57 pm Post subject: |
|
|
| I think you'd need to use the Loop (registry) command (see the help file) and then check if the variables A_LoopRegSubKey or A_LoopRegName contain what you are interested in. |
|
| Back to top |
|
 |
|