Tech Support Forum banner
Status
Not open for further replies.

Need to create a shortcut for a MS DOS command line

1.8K views 6 replies 3 participants last post by  SpywareDr  
#1 ·
Hello everybody,

I need your help to create a shortcut for a MS DOS command line.

There are some steps that I launch manually and I would like them to be simpler.

Here are the steps that I want to turn into a simple shortcut:

1) I go into a directory (C:\Server) with the Windows explorer.

2) I launch a cmd on it (click on the path bar and type cmd then press enter; it launches a cmd with the right working directory).

3) I then type "java -jar HaxServer.jar"; and that's it.

What I want to do, is to create a shortcut that launches directly this line in the correct working directory.

I want to tell Windows "Please perform this line "java -jar HaxServer.jar" in this working directory "C:\Server" using cmd.

Could you please help me to create this shortcut.
 
#3 ·
@GilbertComputer: Thank you very much for the batch.

It worked just fine.

I found another way to do it; the shortcut way.

Create a new shortcut and fill in with this:

%windir%\System32\cmd.exe /k java -jar HaxServer.jar

Then right-click on the shortcut -> Properties -> Working Directory; and fill in with the the right working directory.

Regards.
 
#5 ·
FWIW - If "java.exe" and "haxserver.jar" both exist in "c:\Server", you may be able to use the following single command line:
%windir%\system32\cmd.exe /k c:\server\java.exe -jar c:\server\haxServer.jar


IOW, your simply specifying where each file is located within the command line.
 
Status
Not open for further replies.
You have insufficient privileges to reply here.