• Log in or sign up for an account here: https://www.sythe.org/login

Need a prof help in C++

  • Thread starter Thread starter Nidov
  • Start date Start date
N

Nidov

Guest
hey need a c++ prog 2 edit registry 2 run a text when windows reboot every time and shutdown pc by c++
 
Le Monkey
PHP Shit Show 2k26
Potamus
Prove it!
Sythe Awards 2011 Winner
Tier 1 Prizebox
Tortoise Penis
Trole
UWotM8?
Wait, do you not have an Archer rank?
Err... try explaining that better? You want a program that will make Windows reboot every time the user logs in?
 
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.
 
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.
 
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
 
Runescape Gamblingrunescape gambling
Back
Top