Click here to Skip to main content
15,913,722 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hello

how can i run windows+r command using c# code and run cmd by using c#
Posted

You don't need to use Win+R to run a command prompt, you can run cmd.exe directly.
Process.Start("cmd.exe");
Will do it.
 
Share this answer
 
Comments
sam9787 27-Apr-14 14:30pm    
thanks but i need to use Run to run the teamviewer program
C:\Program Files (x86)\TeamViewer\Version9\TeamViewer.exe -i 190.12.8.8 --Password test
OriginalGriff 27-Apr-14 14:38pm    
Try
Process.Start("C:\Program Files (x86)\TeamViewer\Version9\TeamViewer.exe", "-i 190.12.8.8 --Password test");
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900