Damein Posted October 8, 2015 Share Posted October 8, 2015 I believe that by default you can't make the #RequireAdmin an option-able thing? I am trying to make it where the user has a choice to run the program as admin or not with an INI (Settings) in the program. Func _RunAsAdminCheck() $SettingsData = IniReadSection(@ScriptDir & "\Data\Settings.ini", "Settings") If $SettingsData[1][1] = "1" Then IniWrite(@ScriptDir & "\Data\Settings.ini", "Settings", "1", "0") MsgBox(0, "Settings...", "Admin required set to inactive. Effects will take place after restarting the program.") Else IniWrite(@ScriptDir & "\Data\Settings.ini", "Settings", "1", "1") MsgBox(0, "Settings...", "Admin required set to active. Effects will take place after restarting the program.") EndIf EndFunc The above is what fires when the user clicks a button and enables or disabled admin requirement. And then I have this at the start of the script. $SettingsData = IniReadSection(@ScriptDir & "\Data\Settings.ini", "Settings") If $SettingsData[1][1] = "1" Then TrayItemSetState($TrayMenuSettingsRunAsAdminItem, $TRAY_CHECKED) #RequireAdmin Else TrayItemSetState($TrayMenuSettingsRunAsAdminItem, $TRAY_UNCHECKED) EndIf But whether or not the $SettingsData[1][1] = 1 or 0 it always runs the #RequireAdmin. Is there a way around this or no? Thanks! Most recent sig. I made Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic Link to comment Share on other sites More sharing options...
JohnOne Posted October 8, 2015 Share Posted October 8, 2015 Not with #RequireAdmin, if that appears anywhere in script, it will nedd admin.Search "elevate script". AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Damein Posted October 8, 2015 Author Share Posted October 8, 2015 Ah, perfect. Thank you sir. Most recent sig. I made Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic Link to comment Share on other sites More sharing options...
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