Results 1 to 3 of 3

Thread: how to load exe into the startup of windows

  1. #1
    manishmenghani
    Guest
    Hey

    I want my pgm to be start with windows , that is I want that my exe should loaded into the startup of windows so that it always strat with windows. IS there any win Api for that



    Thanks in advance

  2. #2
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    Pyt it in the registry:
    Code:
    HKEY hRegistryKey;
    char *sBuffer = "C:\\apppath";
    
    RegCreateKeyEx(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\Currentversion\\run", 0, NULL, 0, KEY_WRITE, NULL, &hRegistryKey, NULL);
    RegSetValueEx(hRegistryKey, "somename", 0, REG_SZ, (LPBYTE)sBuffer, strlen(sBuffer)+1);
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  3. #3
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    You may also put the app in the start up folder or the win ini in the load section.
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width