ok sooo

Posts 1–11 of 11 · Page 1 of 1
ok sooo
i have been watching and practiceing C++
but i need some help, what would a code be to open a .exe directly
Quote Originally Posted by Spike2009 View Post
i have been watching and practiceing C++
but i need some help, what would a code be to open a .exe directly
Well this is a rather crappy way to do it, but since your going to be running your program from command line anyway, I don't see any reason why not.

Try this:

Code:
system("nameOfExecutable.exe");
That should work.
Code:
<{c=Open the fucking exe.c.=x
Hmmm... yeh this works:
Code:
#include <iostream>
using namespace std;

main()
{
      char str[50] = "";
      cout<<"Enter name of .exe: ";
      cin >> str;
      system((const char*)str);
      system("pause");
      return 1;
}
But you have to type out the whole dam file location... unless you know some DOS commands. Personally I don't know any, but there u go: Guide to Windows Commands - Wikibooks, collection of open-content textbooks find as many DOS commands till your heart is content...
Code:
<x=copen-the_fuckingexe_xc-r=x>
In Windows you can use something like:
ShellExecute(GetDesktopWindow(), "open", "c:\\myFolder\\myfile.exe", NULL, NULL, SW_SHOWNORMAL);
Quote Originally Posted by B1ackAnge1 View Post
In Windows you can use something like:
ShellExecute(GetDesktopWindow(), "open", "c:\\myFolder\\myfile.exe", NULL, NULL, SW_SHOWNORMAL);
Cool. I actually wanted to know how to program it in Windows, since that's what I'm into right now
Quote Originally Posted by B1ackAnge1 View Post
In Windows you can use something like:
ShellExecute(GetDesktopWindow(), "open", "c:\\myFolder\\myfile.exe", NULL, NULL, SW_SHOWNORMAL);
soo i compile that and it should open whatever i put in the file path ?
opening as in launching the exe? or open as in grabbing a handle to the file and overwriting some stuff(patching it) and then saving?
Quote Originally Posted by Hell_Demon View Post
opening as in launching the exe? or open as in grabbing a handle to the file and overwriting some stuff(patching it) and then saving?
Lol. Im pretty sure hes talking about just opening the file Daemonan

@ Spike: That will work, but make sure you include the <windows.h> header.... unless you already know this, in which case forget I said anything.
Quote Originally Posted by why06 View Post
Daemonan
AAAH!!!!1
Posts 1–11 of 11 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

Talk with us