IniRead not working if script started as administrator?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
kunkel321
Posts: 1047
Joined: 30 Nov 2015, 21:19

IniRead not working if script started as administrator?

16 Feb 2018, 17:33

Hi folks, this thread "evolved" from my other one here https://autohotkey.com/boards/viewtopic ... 9&p=200932 The fix for my other problem, was to make sure my script is running as an administrator. I did this by right-clicking the .exe, choosing Properties, then Compatibility tab, then "Run this program as administrator." It fixed the problem of my hotstrings not working in elevated programs, but now there are problems of my scripts not reading their needed .ini config files. Actually I'm using .txt files for this, but they are formatted as .ini files. If the script is started via a Task Scheduler item at Window startup, then it doesn't read the config file. Also though, if the script is started via Run, from in another script, then the config files are also invisible. However, if I merely double-click the .exe (or an associated shortcut on my desktop), then the script starts working as expected.

Do you guys think that this is likely because I'm using .txt files? Is it because the files are not "elevated" like my script (I'm not sure if an elevated file is even a thing...)

Also possibly relevant: I don't have my scripts in Program Files. They are in C:\Users\swkunkel\AutoHotkey\AutoCorrect. Windows UAC annoyances were actually the reason I put all my AHK there as portable stuff.

I'm using Windows 10. Thoughts?
ste(phen|ve) kunkel
User avatar
kunkel321
Posts: 1047
Joined: 30 Nov 2015, 21:19

Re: IniRead not working if script started as administrator?

18 Feb 2018, 13:13

Yes, that seems to have fixed it! Many thanks!
ste(phen|ve) kunkel

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 214 guests