When I run a script or compiled script (.exe) as admin, the script fails to run as intended.
See the code below, the gui will display the file path, but if it's launched with Admin privilege's the gui will not display the file path.
I would like the user to be able to "Run as Admin" if they'd like to, or run normally.
How can a script function as intended when "Running as Admin" and running normally?
All help and guidance is appreciated.
Code: Select all
#NoEnv
#Singleinstance, Force
gui, add, text, center, Drag and drop file here
gui, add, text, w260 vTXT_1, File path is: %FileNameVar%
gui, show, w280 ,Admin_ahk
return
GuiDropFiles:
GuiControl,, TXT_1, % "File path is: " A_GuiEvent
return