I do not have a Win 8.1 ISO/Virtual Image/DVD (Internet speed here in my country is, well ... ) so I currently have no access to Window 8.
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?
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
Batch Runs Differently in Win 7 and Win 8???
Moderator: DosItHelp
Re: Batch Runs Differently in Win 7 and Win 8???
Some example code would probably be helpful.
-
- Posts: 240
- Joined: 04 Mar 2014 11:14
- Location: germany
Re: Batch Runs Differently in Win 7 and Win 8???
This Program is not for user mode.
this will work in a other window like a runas command
this will work in a other window like a runas command
Code: Select all
runas /user:administrator /noprofile Batchwithdiskpart.cmd
Re: Batch Runs Differently in Win 7 and Win 8???
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?
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.