Newbie needs help !!!

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Marcus
Posts: 1
Joined: 20 Apr 2012 02:50

Newbie needs help !!!

#1 Post by Marcus » 20 Apr 2012 02:58

Good day all ..
Im wanting to run a bat file and call cmd .. and run a command in cmd automatically .
what im trying to achive is run cmd turn test mode on(windows 7)and restart pc . all from the bat file

is this possible without using some installer package.

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

Re: Newbie needs help !!!

#2 Post by foxidrive » 20 Apr 2012 03:20

Marcus wrote:Good day all ..
what im trying to achive is run cmd
turn test mode on(windows 7)
and restart pc .

all from the bat file


What is test mode in Windows 7? I only have XP and I'm curious.

abc0502
Posts: 1007
Joined: 26 Oct 2011 22:38
Location: Egypt

Re: Newbie needs help !!!

#3 Post by abc0502 » 20 Apr 2012 05:41

I have windows 7 and don't know any thing about test mode ?

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

Re: Newbie needs help !!!

#4 Post by Squashman » 20 Apr 2012 05:48

abc0502 wrote:I have windows 7 and don't know any thing about test mode ?

Ditto

abc0502
Posts: 1007
Joined: 26 Oct 2011 22:38
Location: Egypt

Re: Newbie needs help !!!

#5 Post by abc0502 » 20 Apr 2012 06:52

I searched and found this in microsoft support:
To remove the “Test mode Windows 7 build 7600” message in Windows, use the following methods.
Method 1

Click Start, and then type cmd in the Search box.
Right-click cmd.exe under Programs, and then click Run as administrator.
At the command prompt, type the following text, and then press ENTER:
bcdedit /set TESTSIGNING OFF
Close the Command Prompt window, and then restart your computer.

Note If this method does not resolve the issue, go to Method 2.

Method 2

Click Start, and then type cmd in the Search box.
Right-click cmd.exe under Programs, and then click Run as administrator.
At the command prompt, type the following commands, and press ENTER after each command:
bcdedit.exe -set loadoptions ENABLE_INTEGRITY_CHECKS
bcdedit.exe -set TESTSIGNING OFF
Close the Command Prompt window, and then restart your computer.

basically the batch will be like that:

Code: Select all

@echo off
cls
::To start the other batch hidden use this and to start the batch normal remove "/min"
start /w /min %ComSpec% /c "C:\batch.bat"

::To turn the test mode on after the other batch done his work
:: First Methode:
bcdedit /set TESTSIGNING ON

:: Restart the PC "the numbers is for the time before restarting in seconds
shutdown /f /r /t 10 /c "Restarting Computer"

If the First Methode section in the batch didn't work replace with this:

Code: Select all

: Second Methode:
bcdedit.exe -set loadoptions ENABLE_INTEGRITY_CHECKS
bcdedit.exe -set TESTSIGNING ON

Post Reply