e45678mail Posted November 30, 2017 Posted November 30, 2017 (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 November 30, 2017 by e45678mail
Moderators JLogan3o13 Posted November 30, 2017 Moderators Posted November 30, 2017 Have you tried adding #RequireAdmin at the top of the script? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
e45678mail Posted December 1, 2017 Author Posted December 1, 2017 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")
BigDaddyO Posted December 1, 2017 Posted December 1, 2017 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
e45678mail Posted December 4, 2017 Author Posted December 4, 2017 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") -----
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now