News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Registery Editing

Started by sportskid300, June 03, 2007, 04:31:33 AM

Previous topic - Next topic

sportskid300

I was wondering if I could use MASM to add an entry and value to Hikey_Local_Machine\Software\Microsoft\Windows\Run
I'm trying to get it to add a program to run upon start-up every time.
If someone could include some example source that'd be totally great!
Thanks!

EDIT:
Would HIKEY_CURRENT_USER work better?
So far, I've had no success trying to add an executable to The 'Run' section in any regedit subclass.
Thanks again!
I can't wait to make windows...

Vortex

Which is the program to run upon start-up every time?

HKEY_CURRENT_USER stores the settings specific to the user running the current Windows session.

sportskid300

Quote from: Vortex on June 03, 2007, 08:15:30 AM
Which is the program to run upon start-up every time?
Any program, I'm just trying to learn.
Im trying to make a program that will save itself in there, to run itself every time.

Quote from: Vortex on June 03, 2007, 08:15:30 AMHKEY_CURRENT_USER stores the settings specific to the user running the current Windows session.
Alright, I'll go for CURRENT_USER
Can anyone whip me up a sample code?
Thanks!
I can't wait to make windows...

sluggy

There is another reason why you should use HKCU: under Vista your process has to be running with administrative privileges (i.e. the user being part of the administrative group, or the user logged in as administrator are both not good enough) before you can write to HKLM. Any attempt to write to HKLM without the prerequisite privileges will result in the key being shadowed into HKCU.