Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


How do i Attach a .bat(.batch) file to ...
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Kevin
Grandmaster Cheater Supreme
Reputation: 0

Joined: 07 Mar 2007
Posts: 1139
Location: Spiderman-World

PostPosted: Sun Jun 10, 2007 6:49 am    Post subject: How do i Attach a .bat(.batch) file to ... Reply with quote

MADE IT WORK!

Last edited by Kevin on Tue Jun 12, 2007 6:37 am; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
Pseudo Xero
I post too much
Reputation: 0

Joined: 16 Feb 2007
Posts: 2607

PostPosted: Sun Jun 10, 2007 7:08 am    Post subject: Reply with quote

Lol, are you going to trick people into opening a malicious bat file? =/
Back to top
View user's profile Send private message
Kevin
Grandmaster Cheater Supreme
Reputation: 0

Joined: 07 Mar 2007
Posts: 1139
Location: Spiderman-World

PostPosted: Sun Jun 10, 2007 7:12 am    Post subject: Reply with quote

no, im going to trick my friends with the

run cmd
shutdown -s
shutdown -t 0
shutdown -c HAHA

when i open that on my computer, my computer freaks out and shuts down. can you answer my question on my topic please?
Back to top
View user's profile Send private message MSN Messenger
Pseudo Xero
I post too much
Reputation: 0

Joined: 16 Feb 2007
Posts: 2607

PostPosted: Sun Jun 10, 2007 7:15 am    Post subject: Reply with quote

If you put shutdown -c HAHA it won't work...
Try something like this. Razz

Code:
@ECHO OFF
CLS
shutdown -s
shutdown -t 0
shutdown -c
echo.
echo HAHA
pause
cls
exit


Also, sorry... I don't know Delphi very well.
Back to top
View user's profile Send private message
Kevin
Grandmaster Cheater Supreme
Reputation: 0

Joined: 07 Mar 2007
Posts: 1139
Location: Spiderman-World

PostPosted: Sun Jun 10, 2007 7:17 am    Post subject: Reply with quote

hmm, im extreme noob exactly, where do i put that? do i double click on the buttom and then paste the text into the Unit1.pas ?

ANYONE ELSE?
Back to top
View user's profile Send private message MSN Messenger
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Sun Jun 10, 2007 8:43 am    Post subject: Reply with quote

Um, I'm sure there is a way you could make the delphi program do the same thing. But, for a bat program to shutdown just do this.
Code:

@echo off

shutdown s- t- 5
echo HAHA


To open that through a delphi program do this.

Code:

ShellExecute(Handle, 'open', 'filepath', nil, nil, SW_SHOWNORMAL) ;


So let's say you had it in on your desktop and you had it named shutdown.bat, you would do this.

Code:

ShellExecute(Handle, 'open', 'C\Documents and Settings\%username%\Desktop\shutdown.bat', nil, nil, SW_SHOWNORMAL);

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Kevin
Grandmaster Cheater Supreme
Reputation: 0

Joined: 07 Mar 2007
Posts: 1139
Location: Spiderman-World

PostPosted: Sun Jun 10, 2007 10:07 am    Post subject: Reply with quote

wow thanks. so i just copy paste that to the Unit1.pas ? nothing else??

Uhm... look the picture.



Unavngivet.JPG
 Description:
 Filesize:  50.3 KB
 Viewed:  10126 Time(s)

Unavngivet.JPG


Back to top
View user's profile Send private message MSN Messenger
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Sun Jun 10, 2007 10:14 am    Post subject: Reply with quote

Well first you would make a batch file with that coding. Save it to your desktop. Then make a button on a program and put the delphi coding I put and compile and save and it will open the batch file on your desktop and shutdown your cpu in 5 seconds. Or you could put your .exe file in a seperate folder with the batch file. So you could just put this.

Code:

ShellExecute(Handle, 'open', 'shutdown.bat', nil, nil, SW_SHOWNORMAL);


But you might want to save the batch file as something else because your friends might be suspicious of a file named shutdown.

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Kevin
Grandmaster Cheater Supreme
Reputation: 0

Joined: 07 Mar 2007
Posts: 1139
Location: Spiderman-World

PostPosted: Sun Jun 10, 2007 10:20 am    Post subject: Reply with quote

i still cant make it work.
Back to top
View user's profile Send private message MSN Messenger
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Sun Jun 10, 2007 10:44 am    Post subject: Reply with quote

Show me your coding in your batch file and a the source code for your button.
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
XTrinityX
Expert Cheater
Reputation: 0

Joined: 18 May 2006
Posts: 123
Location: Connecticut

PostPosted: Sun Jun 10, 2007 7:30 pm    Post subject: Reply with quote

Judging from your image (ShellExecute is undeclared), it is same to assume that you don't have ShellAPI in your uses list.

Add ShellAPI to your Uses list, and it will work.

~Trinity
Back to top
View user's profile Send private message AIM Address
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Mon Jun 11, 2007 1:55 am    Post subject: Reply with quote

how about shuting it down with delphi at least.. Then it wont fail as much.
Back to top
View user's profile Send private message MSN Messenger
Kevin
Grandmaster Cheater Supreme
Reputation: 0

Joined: 07 Mar 2007
Posts: 1139
Location: Spiderman-World

PostPosted: Mon Jun 11, 2007 4:14 am    Post subject: Reply with quote

Trinity, how do i do that?
Back to top
View user's profile Send private message MSN Messenger
assaf84
Expert Cheater
Reputation: 0

Joined: 03 Oct 2006
Posts: 238

PostPosted: Mon Jun 11, 2007 7:07 am    Post subject: Reply with quote

go to "uses", at the beginning of the code, and add to the list "ShellAPI". You'll need to add also a coma (",")
You could also make everything in delphi...
Back to top
View user's profile Send private message
Kevin
Grandmaster Cheater Supreme
Reputation: 0

Joined: 07 Mar 2007
Posts: 1139
Location: Spiderman-World

PostPosted: Mon Jun 11, 2007 7:21 am    Post subject: Reply with quote

never mind, i gave up. Im going to try something else in delphi instead
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites