[Fixed] Get UAC prompt for compiled script after v1.1.16.05

Report problems with documented functionality
TAC109
Posts: 1129
Joined: 02 Oct 2013, 19:41
Location: New Zealand

[Fixed] Get UAC prompt for compiled script after v1.1.16.05

02 Jan 2015, 21:41

A particular script, when compiled with installed versions 1.1.17.01 or 1.1.18.00, gives a UAC prompt when launched. (The compiled executable also has the UAC shield on the corner of the 'H' icon.) Getting the UAC prompt is extremely undesirable. None of my other scripts have this problem.

When compiled with 1.1.16.05 or earlier, there is no UAC prompt, as expected.

I have used the compiler built in to each release, and also 'fincs' preview-2 ahk2exe compiler (which I prefer), with the same effect. (IOW this problem doesn't seem to be caused by the compiler.)

I've checked the change log for 1.1.17.01, but cannot see anything that is related to this undesirable behaviour.
Last edited by TAC109 on 03 Jan 2015, 18:47, edited 1 time in total.
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe
lexikos
Posts: 9690
Joined: 30 Sep 2013, 04:07
Contact:

Re: Get UAC prompt for compiled script after vn 1.1.16.05

02 Jan 2015, 23:10

This is a Windows feature. To avoid it, you can put a requestedExecutionLevel attribute in the manifest of your executable.

This was done automatically by the manifest tool in the compiler toolchain (without my knowledge) up until v1.1.17.00. However, the manifest tool produced a manifest incompatible with XP SP2 (due to an OS bug), which caused XP SP2 systems to blue screen by simply running the executable.

I will re-introduce the requestedExecutionLevel attribute in the next update, assuming that I can formulate it in a way that does not cause XP SP2 to blue screen.
TAC109
Posts: 1129
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Get UAC prompt for compiled script after vn 1.1.16.05

03 Jan 2015, 01:19

Thanks for your explanation. However there seems to be something in this script that triggers this behaviour as I have other scripts that I have compiled with 1.1.18.00 without this UAC effect. When diagnosing this problem I also copied my script to 'Fred.ahk' but still had the problem after compilation.
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe
lexikos
Posts: 9690
Joined: 30 Sep 2013, 04:07
Contact:

Re: Get UAC prompt for compiled script after vn 1.1.16.05

03 Jan 2015, 02:00

The link I provided says:
Windows Vista heuristically detects installation programs and requests administrator credentials or approval from the administrator user in order to run with access privileges.
"Heuristically" means that it depends on several factors, not just the name of the file.

For example, your product name includes the word "Setup":

Code: Select all

;@Ahk2Exe-SetName                       IFW_Backup_Setup
When compiled with the current release version of Ahk2Exe, this line does nothing and your script is only detected as an installer if it is named "setup.exe" or similar.
TAC109
Posts: 1129
Joined: 02 Oct 2013, 19:41
Location: New Zealand

Re: Get UAC prompt for compiled script after vn 1.1.16.05

03 Jan 2015, 18:44

Thanks again for your help. Changing 'Setup' to 'Set-up' in the file name and the ;Ahk2Exe-SetName entry is enough to defeat this 'feature'. The term 'Mickey Mouse' comes to mind!
My scripts:-
XRef - Produces Cross Reference lists for scripts
ReClip - A Text Reformatting and Clip Management utility
ScriptGuard - Protects Compiled Scripts from Decompilation
I also maintain Ahk2Exe
lexikos
Posts: 9690
Joined: 30 Sep 2013, 04:07
Contact:

Re: Get UAC prompt for compiled script after vn 1.1.16.05

09 Mar 2015, 03:21

I believe this was fixed in v1.1.19.00 (with the reintroduction of requestedExecutionLevel as I mentioned before).

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 22 guests