Help for creating a new key in C++

Discussion in 'C++' started by raghav, Mar 21, 2010.

  1. raghav

    raghav New Member

    Joined:
    Jun 25, 2007
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    None
    Location:
    Australia, NSW, North Rocks, 2151
    Hello people, i needed some help for creating a key in c++.

    I need help for iether, creating it or just writing it on an existing one for a program/software, so that every time the computer starts up, it runs my application.

    If i want the software to start up for only 1 user and no one else on the network, how would i do that? I read on MSDN that there is something called: HKEY_local Machine or something...which i think is the ip address or for all computers in subnet...

    but what i want is, i want the application, to run at every start - up, ONLY for one specific user. So in c++, if i write an program, for exapmple, it blocks the input and swaps the mouse buttons:

    #include <windows.h>
    #include <winable.h>
    int main()
    {
    BlockInput(true);
    Sleep(7000);
    BlockInput(false);
    SwapMouseButton(true);
    Sleep(9000);
    SwapMouseButton(false);
    return(0);
    }


    - I want to make it start up every time the user logs in or something, how would i creat a reg key in c++ or any other method of doing it?

    :D Thanks.
    Raghav.
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    RegOpenKey and related functions you can use to write them.

    For Startups there is a Run key where you can have all your startups programs can be placed.
     
  3. raghav

    raghav New Member

    Joined:
    Jun 25, 2007
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    None
    Location:
    Australia, NSW, North Rocks, 2151
    Hey haven't logged in for ages!!! sory mate....too mch Homework frm school lOL!

    um....and im looking for programming abit now....im looking forward to learn something easy first such as delphi or VB.
    Thanks!!! take care bro
    !!!
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice