Jump to content

Where to put my registry entry?


Recommended Posts

So I know this isn't exactly autoit related, but I really cant find definitive info elsewhere and figured the scripting wizards would be able to help me out!

I need my program to be run on the computer at startup. The computer when booted though does not log in, So what I really need is my program to run when the machine first boots and run when the user has logged on yet. I've been writing my registry entry's like so using this script: 

If $OSArchitecture = "X86" Then
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "CLEAN MACHINE", "REG_SZ", "CLEAN MACHINE PROGRAM PATH")
Else
   RegWrite("HKLM64\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "CLEAN MACHINE", "REG_SZ", "CLEAN MACHINE PROGRAM PATH")
EndIf

Should this be working, or am I doing something wrong? 

Any help is appreciated!! :)

Link to comment
Share on other sites

So long as your script is running with admin then yes.

Also I think you just need...

RegWrite("HKLM64\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "CLEAN MACHINE", "REG_SZ", "CLEAN MACHINE PROGRAM PATH")

If Machine is not x64 will write to appropriate key.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

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