Follow us on Twitter!
Become the change you seek in the world. - Gandhi
Monday, April 27, 2015
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 24
Guests Online: 22
TeamSpeak Online : 5 Members Online: 2

Registered Members: 88079
Newest Member: Cyberdog86
Latest Articles
Our sponsor needs your help!


One of our sponsors needs your help, http://www.virginmediabusiness.co.uk/pitch-to-rich/grow/krystal-hosting/
Go check out their video and Don't forget to vote !


~ Thanks for your help
HBH
View Thread

HellBound Hackers | Computer General | Programming

Author

C++ code to wright a bat file


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 17-09-06 14:05
Can someone tell me how to do a program that
make a bat file and wright some code in it.

Please make a little example of code
here in the Thread.

//wildzor

Edited by on 17-09-06 15:02
Author

RE: hust921

hust921
Member

Your avatar

Posts: 26
Location: Denmark
Joined: 05.08.06
Rank:
Newbie
Warn Level: 70
Posted on 17-09-06 16:42
Code

#include <fstream>
using namespace std;

int main()
{
  ofstream Fil("something.bat", ios::app);
  Fil<<"@echo off"<<endl;
  Fil<<"echo Hallo,world"<<endl;
  Fil<<"pause"<<endl;
  Fil.close();
  return 0;
}






This code will make a batch file look like this:

Code

@echo off
echo Hello, world
pause





hust921B)
Author

RE: C++ code to wright a bat file


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 17-09-06 16:54
ok thanx so mutch Smile
Author

RE: C++ code to wright a bat file


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 17-09-06 22:24
You also could skip the batch file. if all your trying to do is execute commands try
system(commandhere);
example:

int main()
{
system("ping nsa.gov"Wink;
}

enjoy


Author

RE: C++ code to wright a bat file


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 17-09-06 22:26
read my tutorial on c++ system commands