Opened 14 years ago
Closed 13 years ago
#2197 closed Bug (Duplicate)
#RequireAdmin creates a critical error, if the user doesn't start it as local admin
| Reported by: | Owned by: | ||
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.8.1 | Severity: | None |
| Keywords: | Cc: |
Description
#RequireAdmin #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile=C:\Temp\CriticalError.exe #AutoIt3Wrapper_Res_Description=Critical error using #RequireAdmin #AutoIt3Wrapper_Res_Fileversion=1.0.0.0 #AutoIt3Wrapper_Res_LegalCopyright=© 2012: J. Malmgren, wwww.tryware.dk #AutoIt3Wrapper_Res_Language=1033 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ; ***** WARNING: Don't compile and run this script, because it restarts itself thousands of times with new PID's, so you can't stop it again using TaskManager.exe ; There is only 2 ways to stop it again: Restart your computer, or rename C:\Temp\CriticalError.exe to something else using explorer.exe ; ; The reason is kind of described in the help file: "As this function launch a new process, some functions as Consolewrite() cannot be captured" ; ; Yes it certainly launch a new process, launch a new process, launch a new process, launch a new process, launch a new process, launch a new process, launch a new process Local $_sMsg = "If #RequireAdmin is used, but the user isn't local administrator, and doesn't rightclick and select 'another user' being local administrator, " $_sMsg = $_sMsg & "then the script calls itself thousands of times, no matter what you have below, so the MsgBox function below isn't shown!" & @CRLF & @CRLF $_sMsg = $_sMsg & "But if you do nothing else than removing the first line with #RequireAdmin, this script works!" MsgBox(16,"Critical error:",$_sMsg) Exit
Attachments (0)
Change History (9)
comment:2 by , 14 years ago
I tried with no luck to use this combined with #RequireAdmin
#AutoIt3Wrapper_Res_requestedExecutionLevel=highestAvailable
comment:3 by , 14 years ago
I'm not really interested in all those AutoIt3Wrapper statements. I'd also like an actual description of your problem in text rather than just a wall of code. You've left out a lot of important details. From what I gather though this sounds more like a user error than an AutoIt error.
comment:4 by , 14 years ago
Hi Valik
Just copy paste my code, compile it and run it, then I have explained perfectly what the issue is about
comment:5 by , 14 years ago
you only need to logon as a user that's NOT a local admin, and use these lines, and you won't see the MsgBox:
#RequireAdmin
Local $_sMsg = "Hi Valik"
MsgBox(16,"Critical error:",$_sMsg)
Exit
comment:6 by , 14 years ago
You haven't explained it perfectly. You still haven't told us what OS we are supposed to test this on.
comment:8 by , 14 years ago
The more I see this bug report the more annoyed I get at the reporter. What a shitty bug report, whether it turns out to be real or not.
