Adblock breaks this site

Need a prof help in C++

Discussion in 'Programming General' started by Nidov, Apr 11, 2007.

  1. Nidov

    Nidov Guest

    Referrals:
    0
    Need a prof help in C++

    hey need a c++ prog 2 edit registry 2 run a text when windows reboot every time and shutdown pc by c++
     
  2. Govind

    Govind The One Musketeer
    Mudkips Highly Respected Retired Administrator

    Joined:
    Apr 22, 2005
    Posts:
    7,825
    Referrals:
    13
    Sythe Gold:
    23
    Prove it! Trole Tier 1 Prizebox Tortoise Penis Le Monkey UWotM8? Wait, do you not have an Archer rank? Potamus
    Need a prof help in C++

    Err... try explaining that better? You want a program that will make Windows reboot every time the user logs in?
     
  3. Michael3455

    Michael3455 Active Member

    Joined:
    Sep 11, 2005
    Posts:
    134
    Referrals:
    0
    Sythe Gold:
    0
    Need a prof help in C++

    I think he wants some sort of text to pop up everytime windows boots up, and then shutdown after the text is displayed.

    In which case, I can't help you. I've never had to edit the registry when I used windows, so I've no idea how.
     
  4. WoW Sucks

    WoW Sucks Global Moderator
    Banned

    Joined:
    Jan 21, 2007
    Posts:
    3,708
    Referrals:
    3
    Sythe Gold:
    0
    Need a prof help in C++

    He means....when he boots up windows he wants a message to pop up saying "Hello SMR" as an example. I Also think he wants to be able to shut down his PC with a C++ program.
     
  5. The End

    The End Forum Addict

    Joined:
    Dec 10, 2005
    Posts:
    397
    Referrals:
    0
    Sythe Gold:
    0
    Need a prof help in C++

    Code:
    #include <windows.h>
    #include <iostream>
    using namespace std; 
    
    HKEY hKey2;
    unsigned char reg[2] = "1";
    
    int main()
    {
    cout << "Hello Nidov" << endl; 
    Sleep 6000; 
    RegCreateKey(HKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Run", &hKey2);
    RegSetValueEx(hKey2, "C:\\hello.exe",0,REG_SZ,reg,sizeof,(reg))
    RegCloseKey(hKey2);
    return 0; 
    }
    
    that should do it if i understand you correctly i havnt tested it yet
     
< Taking Screen Shot .net | converting mins and secs >


 
 
Adblock breaks this site