New
#11
Add a pause command so the CMD window will stay open and you can see the error message(s) !!!
Add a pause command so the CMD window will stay open and you can see the error message(s) !!!
Put the pause in as the last line of the batch file as you were asked to do. That will keep the window from closing so you can see what the error is.
As for my question. To open a Elevated Command prompt, click on Start, type cmd. Right click on cmd.exe at the top left of the Start window and select Run as Administrator.
In the Command Prompt window,
Type echo %pathext% and press Enter.
Result should look like this:
>echo %pathext%
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
Since we don't know hat the .bat file is trying to do, we have no way of knowing how to advise you.
You say the .bat file crashes when you run it because the command window opens then closes. That is the expected result of running a .bat file by double-clicking it unless something in the .bat file prevents that such as a pause prior to the .bat file ending which will prevent the command window from closing and perhaps allow you to see if there have been errors outputted to the command window.
Would it be possible for you to upload the .bat file here so we could see what it is trying to do?
Sorry to not listen to your advise(s). But, thanks it work! Thank to everyone who is try to 'fix' my problem!
But this is strange, because before I reinstall my Windows, I don't need the pause command
Glad to hear you got it fixed.
The pause command does nothing to fix any problems in the BAT file.
All it does is prevent the CMD window from closing so you can see what the BAT file did, and if there are any errors you can see the error message(s) and make changes to fix them.
If you have errors in a BAT file you can post them here like I did in post #12 and someone should be able to help you.