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 


[Delphi] Get info...

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
e!ns7e!n
Cheater
Reputation: 0

Joined: 06 Sep 2007
Posts: 30

PostPosted: Sun Feb 14, 2010 2:56 pm    Post subject: [Delphi] Get info... Reply with quote

It's very easy when I type the following code in the Command Prompt:
Code:
ipconfig /all > C:\rofl.txt

The result of this line is, that the information for the ipconfig is saved in a new file (rofl.txt) in C:\.

But how can I achieve the same result using Delphi 7? Rolling Eyes
I tried the following things, but I didn't have any successful results:
Code:

ShellExecute(0, 'open', 'C:\WINDOWS\system32\cmd.exe', 'ipconfig /all > C:\rofl.txt', nil, SW_SHOWNORMAL) ;


and

Code:

ShellExecute(0, 'open', 'C:\WINDOWS\system32\ipconfig.exe', '/all > C:\rofl.txt', nil, SW_SHOWNORMAL) ;


I am almost sure that this line is correct:
Code:

ShellExecute(0, 'open', 'C:\WINDOWS\system32\ipconfig.exe', '/all', nil, SW_SHOWNORMAL) ;

(obviously it doesn't save my file to C:\) and most probably the error is in the unknown parameter ("> C:\rofl.txt") ...

So, can you correct my mistake? Thanks. Wink
Back to top
View user's profile Send private message
Hologram
How do I cheat?
Reputation: 0

Joined: 07 Jan 2010
Posts: 8

PostPosted: Wed Feb 17, 2010 6:32 pm    Post subject: Reply with quote

Code:

ShellExecute(0, 'open', 'cmd.exe', '/c ipconfig /all > C:\rofl.txt', nil, SW_SHOWNORMAL);

or you can save commands to .bat file and call this file
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
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