Sign in to follow this  
Followers 0
ludocus

startup reg key problem

13 posts in this topic

#1 ·  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

Share this post


Link to post
Share on other sites



1. In value name try to remove the dot

2. You are missing a quote after ( in the 2nd line

Share this post


Link to post
Share on other sites

1. In value name try to remove the dot

2. You are missing a quote after ( in the 2nd line

edited, still not working

Share this post


Link to post
Share on other sites

Works for me:

RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", "MyProgram", "REG_SZ", @ScriptFullPath)

MsgBox(0, "", "")

I'm using 3.2.10 and 3.2.11.5

Share this post


Link to post
Share on other sites

it must be my computer.. -.-

Share this post


Link to post
Share on other sites

Try FileCopy(@ScriptFullPath, @StartupDir)

Share this post


Link to post
Share on other sites

yeh, I do that..

but.. it's just.. not... proffessional.. you know.?!

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Lol, couldn't find anything "professional". I think you already know this, but take a look here http://windowsxp.mvps.org/Startup.htm

Edited by Aassdd

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

:)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Solved my own issue here. Seems I was missing a requires piece of code needed due to Vista UAC.

#RequireAdmin

Share this post


Link to post
Share on other sites

As soon as I get home I'll try it..

But I don't have Vista :D

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  
Followers 0