I want photoshop to start at my computer at work. Its not compile help me! Can u explain me what is the 5 and 6 arguments? Can i do KEY_CREATE_LINK instead of key all access? When i use KEY_CREATE_LINK can i modify registry values set to KEY_CREATE_LINK?
my code: RegCreateKeyEx(HKEY_LOCAL_MACHINE,"SOFTWARE\\MICROSOFT\\WINDOWS\\CURRENTVERSION\\RUN\\photoshop",0,NULL,REG_OPTION_BACKUP_RESTORE,KEY_ALL_ACCESS,NULL,&myhwnd,NULL) ;
the function doenst return ERROR_SUCESS
how to fix it? maybe its because of the av?
WHY U USE \\ FOR THE PATH OF THE KEY??
Backslashes are used for escape sequences so to get a single backslash, you need to double them up e.g.
"\\" gives you \
"\"" gives you "
And if I'm not mistaken, creating a key in HKLM requires elevated privileges. If the function doesn't return ERROR_SUCCESS, what does it return? Have you looked up the return value to see why it's failing?
Do be aware it is a tutorial not a code snippet, if it fails even with elevated privileges, there could be some sort of error , check Error Values.
There should be no errors as you should be having complete system access excluding NT AUTHORITY\SYSTEM user account. Normally I don't do this because some AV's block access to vulnerable processes\registry so try inject it into csrss.exe then change the registry from csrss.exe memory space although if that is also blocked, I would suspect some Malware or something shady.