Jump to content

How to enable test mode by "run" or "shellexecute"?


Recommended Posts

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
Link to comment
Share on other sites

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")

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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")

-----

Link to comment
Share on other sites

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
 Share

×
×
  • Create New...