Dec 9, 2012 at 3:20pm UTC  
 
Hi, guys. 
I am looking for something to run programs on Windows startup. I know a manually way, but I am looking for some simple function in windows.h, because not all users have OS in  C: drive. 
 
Can someone help me ?
 
 
 
 
  Dec 10, 2012 at 11:35pm UTC  
 
Last edited on Dec 10, 2012 at 11:36pm UTC  
 
 
 
 
  Dec 11, 2012 at 9:41pm UTC  
 
Thanks, Last thing. 
when i put value(REG_ZS)  to registry: 
 
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run  
 
I must set current location of the .exe, this brings me to the question: 
How to determine location of currently  running program (.exe) ?
Last edited on Dec 11, 2012 at 9:42pm UTC  
 
 
 
 
  Dec 12, 2012 at 12:42am UTC  
 
int  main(int  argc, char * argv[]) { 
 
argv[0] is a string that contains the current directory and file name.
 
 
 
 
  Dec 12, 2012 at 1:34am UTC  
 
Also GetModuleFileName does the job of getting your exes name.
Last edited on Dec 12, 2012 at 1:35am UTC  
 
 
 
 
  Dec 12, 2012 at 10:51pm UTC  
 
Thanks a lot for answers now all work perfect again thanks :-)
Last edited on Dec 12, 2012 at 11:04pm UTC