• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 237
  • Last Modified:

How to send a command to windows console?

like:

c:\haha.avi

to open a movie
0
Knightley
Asked:
Knightley
  • 4
1 Solution
 
zzynxSoftware engineerCommented:
Runtime.getRuntime().exec("cmd.exe /c c:/haha.avi"); on a windows machine
0
 
zzynxSoftware engineerCommented:
Sorry:
Runtime.getRuntime().exec("cmd.exe /c start c:/haha.avi");
0
 
zzynxSoftware engineerCommented:
And
Runtime.getRuntime().exec("cmd /c start a.doc");  // to start Word
Runtime.getRuntime().exec("cmd /c start http://www.yahoo.com"); // to start the browser
Runtime.getRuntime().exec("cmd /c start mailto:someone@aol.com"); // to start your mail program
0
 
KnightleyAuthor Commented:
thanx
0
 
zzynxSoftware engineerCommented:
Thanks for accepting
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now