Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › C++/C Programming › I'm newbie programmer... I need some help.

I'm newbie programmer... I need some help.

Posts 1–7 of 7 · Page 1 of 1
swakwan11
swakwan11
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 :/


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;
}
#1 · 12y ago
abuckau907
abuckau907
Quote Originally Posted by swakwan11 View Post
.
utorrent is uTorrent.exe

maybe same case with steam? I don't have it installed. (I think spelling is correct; see below)
Does "steam.exe" expect command-line arguments? Right Click on your shortcut to the game and check the path.

ex.
C:\Users\...\uTorrent\uTorrent.exe <-- no command-line-arguments being passed to the program
C:\Users\...\uTorrent\uTorrent.exe -option1=true -option2=true <--2 are being passed
->ShellExecute has a parameter for 'command line arugments' if that's the issue.

------------------------------------------------
There are 2 ways (that I can think of) to have a program start on Login

Putting it in the "Startup" folder. (I can't remember folder path)
Adding a registry key (where? I can't remember) - I think there is a separate location for "All Users" and "1 specific user".

edit: not sure how I missed that...you're not using absolute file paths..how could it know which file to run? What if multiple files have the same name? ..I'd use absolute file paths, or do as mentioned below.
#2 · edited 12y ago · 12y ago
FO
Fovea
The Windows file system is case insensitive. The real reason why you cannot run Steam or µTorrent is that these applications do not have an App Paths subkey. For starting an application on login, modify the Run key.
#3 · 12y ago
swakwan11
swakwan11
I think I understand what you are saying. Do you mean like StartProgram("C:\Users\..\uTorrent *blah blah blah*?
Quote Originally Posted by abuckau907 View Post
utorrent is uTorrent.exe

maybe same case with steam? I don't have it installed. (I think spelling is correct; see below)
Does "steam.exe" expect command-line arguments? Right Click on your shortcut to the game and check the path.

ex.
C:\Users\...\uTorrent\uTorrent.exe <-- no command-line-arguments being passed to the program
C:\Users\...\uTorrent\uTorrent.exe -option1=true -option2=true <--2 are being passed
->ShellExecute has a parameter for 'command line arugments' if that's the issue.

------------------------------------------------
There are 2 ways (that I can think of) to have a program start on Login

Putting it in the "Startup" folder. (I can't remember folder path)
Adding a registry key (where? I can't remember) - I think there is a separate location for "All Users" and "1 specific user".

edit: not sure how I missed that...you're not using absolute file paths..how could it know which file to run? What if multiple files have the same name? ..I'd use absolute file paths, or do as mentioned below.
#4 · 12y ago
abuckau907
abuckau907
Quote Originally Posted by swakwan11 View Post
I think I understand what you are saying. Do you mean like StartProgram("C:\Users\..\uTorrent *blah blah blah*?

yes that's what I meant..usually you use an absolute file path unless the file is in the same directory as the program.

try it and find out.
#5 · edited 12y ago · 12y ago
swakwan11
swakwan11
I'm not saying that wont work, but I think I guess I'll have to change something outside the function for me not to get syntax error. Thanks you
edit: Do you mean put that in the void StartProgram() or the StartProgram :/
Quote Originally Posted by abuckau907 View Post
yes that's what I meant..usually you use a absolute file path unless the file is in the same directory as the program.

try it and find out.
#6 · edited 12y ago · 12y ago
abuckau907
abuckau907
Relative file path vs. absolute file path


void Programs()
{
StartProgram("chrome.exe");
StartProgram("steam.exe");
StartProgram("utorrent.exe");
StartProgram("devenv.exe"); //name is visual studio
StartProgram("iTunes.exe");
}
^^All 'relative' paths, not 'absolute'.
...How on earth could the PC know where the file is located/ if it found the correct one?
...it can't! Use absolute file paths.

change them to absolute paths:
void Programs()
{
StartProgram("firefox.exe"); <-- RELATIVE. what directory is this in?

vs.

StartProgram("C:\Program Files (x86)\Mozilla Firefox\firefox.exe"); <-- ABSOLUTE. we know which directory.
}
 
rant

Quote Originally Posted by swakwan11 View Post
...
edit: Do you mean put that in the void StartProgram() or the StartProgram :/
Read a f***ing book and learn the difference : ) ...that's basic language stuff that you SHOULD learn when learning the language, not half way through your "first major project."
#7 · edited 12y ago · 12y ago
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

  • I need some help with binding eps7By v1zhaixingv1 in Vindictus Help
    3Last post 15y ago
  • Need some help to make a botBy Domo in Vindictus Help
    6Last post 15y ago
  • Need some help with my server premisionsBy pero122 in Minecraft Help
    5Last post 14y ago
  • need some help plzBy crappule20 in Combat Arms Help
    2Last post 14y ago
  • Need some help with my ProjectBy Vertual~ in Call of Duty Modern Warfare 3 Help
    2Last post 14y ago

Tags for this Thread

None