Jump to content

Windows Registry Changes


Recommended Posts

Greetings, I am a newbie and I am trying to compile a file that will add/change a series of windows registry entries.

I created a txt file will the changes ie:

reg add Software\Policies\Microsoft\Internet Explorer\Toolbars\Restrictions\ /v TEST /t REG_DWORD /d 00000001

and when I run the file, I get an error that says it was unable to parse line.

Can anyone help?! Any tips and advice will be greatly appriciated!

thanks

Link to comment
Share on other sites

So far as I know, you cannot run txt files with anything other than notepad. Autoit is not a batch language. If you are trying to run commands like the one you showed above, rename your text file to .bat and open it.

If, however, you want to do this in autoit, READ_THE_HELPFILE and look at something called RegWrite.

EDIT: spelling

Edited by this-is-me
Who else would I be?
Link to comment
Share on other sites

Welcome to the forums!

Unlike some scripting languages, anything that is meant to be executed as a program must be explicitly stated as such:

runWait('reg add Software\Policies\Microsoft\Internet Explorer\Toolbars\Restrictions\ /v TEST /t REG_DWORD /d 00000001')

Given the way that your line is currently written however, it's worth mentioning that convert the above to a native AutoIt instruction is trivially easy:

; assuming HKEY_CURRENT_USER
  regWrite("HKCU\Software\Policies\Microsoft\Internet Explorer\Toolbars\Restrictions", "TEST", "REG_DWORD", 1)

so depending on your circumstances you may prefer to entirely rewrite your files in this way. Read up on the RegWrite() topic in the help file for further info.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...