Hi
I am trying to use 'cmd /foff' in a simple batch file but all it runs is this and nothing else after it.
Any ideas what im doing wrong?
Many thanks
Paul
using cmd /foff in batch file
Moderator: DosItHelp
Re: using cmd /foff in batch file
Here a example for the prompt:
The same code for a batch file:
The first command will display a text.
The second command will run a new instance of CMD. Also possible with parameters.
Now you can input different commands.
Here a example: set game=game name
set game
You will see "game name"
Input the command EXIT
The third command will display the text.
set game
If you have change variable in the CMD command then you have lost this change.
Code: Select all
(echo Here text number 1.) & (cmd) & (echo Here text number 2.)
The same code for a batch file:
Code: Select all
@echo off
echo Here text number 1.
cmd
echo Here text number 2.
The first command will display a text.
The second command will run a new instance of CMD. Also possible with parameters.
Now you can input different commands.
Here a example: set game=game name
set game
You will see "game name"
Input the command EXIT
The third command will display the text.
set game
If you have change variable in the CMD command then you have lost this change.