I'm newbie programmer... I need some help.
Hi, I'm starting to get around to starting a program, and I'm working on a program that will start some of my applications for me. NOW, the code below does just that, it does exactly what I want it to do expect the fact that it wont start steam or utorrent for some reason
! But the problem is is that I wan't this program to automatically start on login, start up , or what have you. I've been looking around for some answers over the internet but everything seems a bit vague. If anyone would know how to do this I'd be appreciative
. If it makes any difference I use vs_ultimate 2013 :/
! But the problem is is that I wan't this program to automatically start on login, start up , or what have you. I've been looking around for some answers over the internet but everything seems a bit vague. If anyone would know how to do this I'd be appreciative
. If it makes any difference I use vs_ultimate 2013 :/Code:
#include <iostream>
#include <Windows.h>
using namespace std;
void Message()
{
HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_INTENSITY);
cout << "Welcome Swakwan. How was your day?" << endl;
cout << "You prorgram will begin in one second." << endl;
}
void StartProgram(string filename)
{
ShellExecute(NULL, "open", filename.c_str(), NULL, NULL, SW_SHOWNORMAL);
}
void Programs()
{
StartProgram("chrome.exe");
StartProgram("steam.exe");
StartProgram("utorrent.exe");
StartProgram("devenv.exe"); //name is visual studio
StartProgram("iTunes.exe");
}
int main()
{
Message();
Programs();
system("pause");
return 0;
}
