Jump to content

startup reg key problem


Recommended Posts

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

:)

Link to comment
Share on other sites

  • 2 weeks later...

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

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