Jump to content

Changing registry key from inputbox entry


Recommended Posts

I'm having an issue with this script: (I'm a total newbie at coding in autoit and coding in general)

#include <MsgBoxConstants.au3>
#RequireAdmin
$answer = InputBox("Customizer","Please enter the users name:")
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "RegisteredOwner", "REG_SZ", $answer)

What I am trying to accomplish is the Answer of the inputbox modifies the key in the registry. I cannot seem to get something simple to work, Ive tried running it as an admin and without to no avail. This should be simple. Am I even on the right track?

 

 

Thanks,

 

John

Link to comment
Share on other sites

Thank You so much.

One more thing.

I want to be able to add users to the local administrator group. How can this be accomplished.

This is what I am trying to accomplish which can be done via the command prompt, but how can I accomplish this in autoit?

net localgroup Administrators /add FECC\HelpDesk

 

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...