Jump to content

Recommended Posts

Posted (edited)

I tried:

RegWrite ('HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run', 'program', 'REG_SZ', @ScriptFullPath )

RegWrite ('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run' , 'program', 'REG_SZ', @ScriptFullPath )

but neither of them work.. I use windows XP,

and in my program is just a test code:

msgbox ( 0, 'test', 'test' )

no msgbox shows up when I reboot, but C:\My Documents folder comes up..

Whats the problem here?

Edited by ludocus
Posted

Did you try to compile your script before putting it in the start up folder? If you didn't, it will not work. If you want it to work without having to compile it use:

@AutoItEXE & " " & @ScriptFullPath

Posted

no msgbox shows up when I reboot, but C:\My Documents folder comes up..

Whats the problem here?

Your path is something like this

C:\Documents and Settings\Some Folder\.....

and breaking at the first space character.

So use quotes with a path that may contain a space character or more.

RegWrite('HKCU\Software\Microsoft\Windows\CurrentVersion\Run' , 'program', 'REG_SZ', '"' & @ScriptFullPath & '"')

The script needs to be compiled for the above example code to work.

:)

  • 2 weeks later...
Posted

I can not get anything to add ito my registry, seems similar to this. I am trying to create a new string value. But it never shows up. Client is Windows Vista.

$date = (@MON & "/" & @MDAY & "/" & @YEAR)
MsgBox (0, "date and time", $date)

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Company", "Refresh", "REG_SZ", "date") ;tried using text only to see if it would work
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Company", "Refresh", "REG_SZ", "$date")oÝ÷ Ú«¨µéÚ

The script needs to be compiled for the above example code to work.

:D

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
×
×
  • Create New...