Need a prof help in C++

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

Need a prof help in C++
  1. Unread #1 - Apr 11, 2007 at 5:29 AM
  2. Nidov
    Referrals:
    0

    Nidov Guest

    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++
     
  3. Unread #2 - Apr 17, 2007 at 1:57 PM
  4. Govind
    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

    Govind The One Musketeer
    Mudkips Highly Respected Retired Administrator

    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?
     
  5. Unread #3 - Apr 18, 2007 at 12:40 AM
  6. Michael3455
    Joined:
    Sep 11, 2005
    Posts:
    134
    Referrals:
    0
    Sythe Gold:
    0

    Michael3455 Active Member

    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.
     
  7. Unread #4 - Apr 18, 2007 at 3:28 AM
  8. WoW Sucks
    Joined:
    Jan 21, 2007
    Posts:
    3,708
    Referrals:
    3
    Sythe Gold:
    0

    WoW Sucks Global Moderator
    Banned

    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.
     
  9. Unread #5 - Apr 20, 2007 at 5:54 PM
  10. The End
    Joined:
    Dec 10, 2005
    Posts:
    397
    Referrals:
    0
    Sythe Gold:
    0

    The End Forum Addict

    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 >

Users viewing this thread
1 guest


 
 
Adblock breaks this site