Jump to content
Sign in to follow this  
Xavia

How do I go to a certain directory in regedit?[SOLVED]

Recommended Posts

Xavia

I need to go to this directory in regedit

kk.png

Edited by Xavia

Share this post


Link to post
Share on other sites
SadBunny

What do you mean by "go into a directory"? Do you mean automating the registry editor to browse to that directory (hopefully not), or do you mean peeking/poking keys/values in that directory? If the latter, try RegRead()RegEdit()RegDelete() etc.. They have good helpfiles and working examples.

Note that you'll most probably need to add #RequireAdmin to the top of your script to elevate to admin privileges, otherwise Windows won't let you mess with the registry :)

Edited by SadBunny
typo

Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites
Xavia

I wanted for my script to go to:

conputer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\McAfee SiteAdvisor Service

but since Mcafee wont be constant, I plan to store a variable in a notepad and read it, so what will happen is

conputer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\$Variable

Share this post


Link to post
Share on other sites
Chimaera

If you mean open regedit at a specific key?

Regedit itself is difficult to automate
but you can change the last page it viewed and use something like this vbs script

Set WshShell = CreateObject("WScript.Shell")
WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\Regedit\Lastkey","HKEY_LOCAL_MACHINE\SYSTEM\Setup\Test","REG_SZ"
WshShell.Run "regedit", 1,True
Set WshShell = Nothing

just save it as regchange,vbs and it should work, there are versions on the AutoIt forum but i had trouble getting them to work
Just change the bit in blue before you save it to your key

Edited by Chimaera

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×