Hi, my script works only when I run it with - Run As Administrator.
How to fix it?
Run as Admjnistrator
Re: Run as Admjnistrator
You don't leave many clues. Perhaps you can start here: UAC.
Re: Run as Admjnistrator
What clues you need to unswer my question? I think everything is clear.Helgef wrote:You don't leave many clues. Perhaps you can start here: UAC.
Re: Run as Admjnistrator
Good then!samardac wrote:I think everything is clear.
Re: Run as Admjnistrator
My script try to create folder in A_Temp, or try to modify registr but no luck only it works only if you run exe As Administrator.Helgef wrote:Good then!samardac wrote:I think everything is clear.
Re: Run as Admjnistrator
That's how windows works, nothing to do with ahk, you need permision (admin) to do stuff on certain places, the link I provided suggests some "Common workarounds". I don't know, but I think A_MyDocuments is less restricted. Btw, I can write to A_Temp without script being admin, probably because UAC settings.
Re: Run as Admjnistrator
That work arounds are very complex foe me, would be greate to have some simple instructions.Helgef wrote:That's how windows works, nothing to do with ahk, you need permision (admin) to do stuff on certain places, the link I provided suggests some "Common workarounds". I don't know, but I think A_MyDocuments is less restricted. Btw, I can write to A_Temp without script being admin, probably because UAC settings.
Re: Run as Admjnistrator
I have nothing else, maybe someone else saves the day, if not, you should consider to modify your script such that it doesn't rely on admin privileges.would be greate to have some simple instructions.
Good luck.
Re: Run as Admjnistrator
Would it help to have the script run as Admin automatically? If so, add this to the top of your script...
Code: Select all
#singleinstance off
if not A_IsAdmin
{
Run *RunAs "%A_AhkPath%" "%A_ScriptFullPath%"
ExitApp
}
Re: Run as Admjnistrator
*RunAs dose not work I tried itGuest wrote:Would it help to have the script run as Admin automatically? If so, add this to the top of your script...
Code: Select all
#singleinstance off if not A_IsAdmin { Run *RunAs "%A_AhkPath%" "%A_ScriptFullPath%" ExitApp }
Who is online
Users browsing this forum: filipemb, mikeyww, peter_ahk, Spawnova, USS_Sandhu and 318 guests