using cmd /foff in batch file

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
aveit
Posts: 8
Joined: 17 Oct 2011 05:16

using cmd /foff in batch file

#1 Post by aveit » 17 Oct 2011 05:21

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

trebor68
Posts: 146
Joined: 01 Jul 2011 08:47

Re: using cmd /foff in batch file

#2 Post by trebor68 » 17 Oct 2011 14:28

Here a example for the prompt:

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.

Post Reply