i am trying to start up a series of .exe's (minecraft console client)
with only 1 click but when i setup an .bat file it opens it in the folder where the .bat is placed not where the .exe is and all the info files are where the .exe is, i would just move them but all the info files are called the same things with diffrent info and the .exe is encrypted (so nobody can take code, i think its called encrypted idk).
How I want it to load: http://gyazo.com/a451735cb34262bf1bfc0709e7d6a11c
How it actually loads: http://gyazo.com/4ed35f560c41370d9d33f865fc67fccf
The .bat: START C:\Users\Fergal\Desktop\ConsoleClient\Vortex\Pinshi_Bwub\MinecraftClient.exe -Would have used another gyazo but don't have enough rep :(
Try the following batch file:
cd C:\Users\Fergal\Desktop\ConsoleClient\Vortex\Pinshi_Bwub
start MinecraftClient.exe
Related
I created a Windows Command Script, .cmd, to perfom a list of project tasks. This batch file is placed in the root folder of the project, so when I run it, double clicking the .cmd file, it starts the script placed where the file is located, e.g. C:\user\project\TheProject.
The problem comes when I send this file to another machine, first it is recognized as an unknown script, so the end user has to agree to 'run it anyway'.
After that doesn't matter where the file is placed, it always start in the same route C:\Windows.
I'm trying to get a bat file together and not sure how to run multiple cmd lines through the .bat.
Objective: I want to be able to click on this .bat file to open cmd prompt, then to find a "folder" in the directory, rename the "Folder" then move the location of the folder then find a existing Folder and put it in the same directory.
Problem: i know how to run these cmds in the prompt without an issues.
So far this is what i have:
#echo off
start cmd.exe /k cd %AppData%\Microsoft\Network\Connections
#echo off
and then just write your commands its that simple
A .bat file is executed in a terminal window automatically, you don't need to call cmd.exe or anything like that.
Every single line you write in the .bat file is going to be executed one by one, so you just need to write multiple lines with all the instructions and then you can double click on your new file to run the script.
If you are not familiar with Windows commands for the terminal, you can find more info on the web about how to find a folder, rename it, etc. There are many things you can do by command line and this is not the right place to explain how to use them.
I'm attempting to write a batch file that will move to the specified directory and then run the command to open my desired program. Specifically I want it to run the command HardwareSimulator so it will open the software nand2tetris provides.
I've gotten it to move to the directory I want, but the opening is my issue. Code is displayed below. I'm guessing start isn't the correct command since when I run, it just runs an infinite loop of opening cmd prompts.
My second question would be: can I only go into sub-directories of where my batch file is already stored? It would be easier to store it in my desktop, so I can just click it whenever, but I can't seem to make it back out of a directory and then go down into another.
start cmd
pushd \nand2tetris\projects\P1Codes
start HardwareSimulator
pause
You can use ..\ to go back a directory.
For instance, if you had nand2tetris in your downloads folder you could get to it from the desktop with this script. Also make sure to to include the file extension.
pushd ..\Downloads\nand2tetris\projects\P1Codes
start HardwareSimulator.exe
pause
similar to this -> Create a standalone .exe file
however I am not sure about the responses posted there.
I have a console application and i want to launch and execute a batch file.
build everything works fine, but when i move the compiled .exe file, it says file not found.
How do I ship test.bat with my .exe, I do not want to create an installer, rather a standalone exe. Not comfortable with ClickOnce.
Update Currently I add that batch file as a resource, read its contents and re-create the file in a temp location. Then execute that batch file from there. Any other suggestions ?
How to customize shortcut in compressed file to run exe from current directory? For example, i want to put compress two file inside winrar first is program.exe and the second is shortcut to that program, if i compress that in rar extension, and copy compressed file in other directory and open with winrar and run shortcut, i get nothing. So my question is what code to put in shortcut to run program.exe regardless in which directory will be compressed file extract?
You get nothing because there is no program to run. A compressed file isn't a filestore from which files can be run. When you "run" a file from a compressed file, the OS is actually extracting that file to a temp folder and then running it. When you tru and run the shortcut, its being extracted, but the temp folder in which it was extracted doesn't contain the actual .exe you're trying to launch, so nothing happens.
As to how you achieve what you want, I have no idea, but would not be suprised if it was not possible. If you're running the exe from a compressed file, why do you need the shortcut? Why not just click the .exe?