Jump to content

Recommended Posts

Posted (edited)

Hi~

I have some question about how to enable the test mode via "Run" or "shellexecute" of command,

was to tried :

-----

Run("bcdedit.exe /-set testsinging on", "C:\Windows\System32")

and

shellexecute("bcdedit.exe /-set testsinging on", "C:\Windows\System32")

-----

since this command must to run through administrator competence,

have any method can accomplish it?

 

 

Edited by e45678mail
Posted
13 hours ago, JLogan3o13 said:

Have you tried adding #RequireAdmin at the top of the script?

Yes, this command already to include,

seem as the command type is incorrect:

Run("bcdedit.exe /-set testsinging on", "C:\Windows\System32")

and

shellexecute("bcdedit.exe /-set testsinging on", "C:\Windows\System32")

 

Posted

if you run that from a CMD prompt manually, does it work?  once you get it to work from the command line, then you can use it in the Run()

if you really need Admin, then you should launch the cmd.exe as Administrator when testing this line.

bcdedit.exe /set testsinging on

Posted
On 2017/12/1 at 11:35 PM, BigDaddyO said:

if you run that from a CMD prompt manually, does it work?  once you get it to work from the command line, then you can use it in the Run()

if you really need Admin, then you should launch the cmd.exe as Administrator when testing this line.

bcdedit.exe /set testsinging on

Yes, if run this command in CMD.exe and by Admin, it is workable.

but can't work by Run() with AutoIT,

you mean under AutoIT can through following to execute it?

-----

#RequireAdmin

Run("bcdedit.exe /set testsinging on")

-----

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...