Batch Runs Differently in Win 7 and Win 8???

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Meerkat
Posts: 89
Joined: 19 Jul 2015 02:27
Location: Philippines

Batch Runs Differently in Win 7 and Win 8???

#1 Post by Meerkat » 10 Jun 2016 07:49

I do not have a Win 8.1 ISO/Virtual Image/DVD (Internet speed here in my country is, well ... :x ) so I currently have no access to Window 8. :cry:

Anyways, as I observe in SO, when a batch file, being run in Win 8, contains some external commands (e.g. DISKPART), it seems like CMD runs that external command in a new CMD window. Unlike in my Win 7 notebook, where in the external command runs "inside". Is my observation right? :roll:

And in case I am right, how to put external command "inside" the opened Batch file?

I will try to find a Win 8, and try my codes...

Thanks!
Meerkat

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: Batch Runs Differently in Win 7 and Win 8???

#2 Post by Squashman » 10 Jun 2016 08:24

Some example code would probably be helpful.

pieh-ejdsch
Posts: 240
Joined: 04 Mar 2014 11:14
Location: germany

Re: Batch Runs Differently in Win 7 and Win 8???

#3 Post by pieh-ejdsch » 12 Jun 2016 02:58

This Program is not for user mode.
this will work in a other window like a runas command

Code: Select all

runas /user:administrator /noprofile Batchwithdiskpart.cmd

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Batch Runs Differently in Win 7 and Win 8???

#4 Post by foxidrive » 14 Jun 2016 23:06

Meerkat wrote:Anyways, as I observe in SO, when a batch file, being run in Win 8, contains some external commands (e.g. DISKPART), it seems like CMD runs that external command in a new CMD window. Unlike in my Win 7 notebook, where in the external command runs "inside". Is my observation right? :roll:


I have seen some commands run in another cmd window and I think that this is what you're referring to. Running the script as administrator seems to solve this issue, as it is an issue of (UAC) user access control.

Post Reply