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 


[C#] running cmd commands

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Mon Aug 18, 2008 6:41 pm    Post subject: [C#] running cmd commands Reply with quote

hey guys i was wondering.. is there a way to run cmd commands without the cmd window will pop up on the screen and just do the command?
_________________
Stylo
Back to top
View user's profile Send private message
pkedpker
Master Cheater
Reputation: 1

Joined: 11 Oct 2006
Posts: 412

PostPosted: Mon Aug 18, 2008 6:47 pm    Post subject: Reply with quote

yes there is way.. cuz command prompt gives back data and you could send data to it by outdata=cmd.exe [datahere]

here is a example I found

Code:

public void GenerateKeyFile(string path)
        {
            string commandLine = " \"C:\\Program Files\\Microsoft Visual Studio 8\\SDK\\v2.0\\Bin\\sn.exe\" -k ";
            ProcessStartInfo PSI = new ProcessStartInfo("cmd.exe");
            PSI.RedirectStandardInput = true;
            PSI.RedirectStandardOutput = true;
            PSI.RedirectStandardError = true;
            PSI.UseShellExecute = false;
            Process p = Process.Start(PSI);
            System.IO.StreamWriter SW = p.StandardInput;
            System.IO.StreamReader SR = p.StandardOutput;
            SW.WriteLine(commandLine + path);
            SW.Close();
        }


replace and remove commandLine + path if you don't need it and fill it with your own commands

the SR should have the output of it.
Back to top
View user's profile Send private message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Mon Aug 18, 2008 8:00 pm    Post subject: Reply with quote

great thx =]
_________________
Stylo
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