Controling the usage of UAC

An ability to enable or disable the request for UAC. Now it can be controlled only via compiler definition so if you don't want UAC, you need to change the source code of wupdate.pas after every component update. However there is no easy way how to check this state at build time.

I second this suggestion.

e.g. in WUpdate.pas we have:

unit WUpdate;

{$I TMSDEFS.INC}

{$DEFINE USEUAC}

{$IFDEF USEUAC}
{$R WUPDATE.RES}
{$ENDIF}

{$IFNDEF USEUAC}
{$R WUPDATENO_UAC.RES}
{$ENDIF}

The suggestion I've seen from from TMS/Bruno in multiple support requests and elsewhere over the years is to simply disable/remove the USEUAC conditional e.g.

{.$DEFINE USEUAC}

This is OK, but it adds a bit of unnecessary friction because it requires each user/install to edit the TMS source and/or make a copy of this unit and edit it, and check it into the project version control, and then remember to re-do this every time we update the TMS component. If the user wants to control this setting individually for each of their projects, they will need to make a copy of this unit for every project.

Perhaps if you added something like this to Wupdate.pas it would help?

{$IFNDEF SKIPUAC}
{$DEFINE USEUAC}
{$ENDIF}

I think it would users to disable/remove the USEUAC define without having to copy/edit TMS source e.g. by just adding SKIPUAC to their project-level defines, while at the same time keeping consistent behaviour for everyone else as before?

See also this discussion, I think the suggestion above should provide a backward compatible way to address it?

EDIT: Actually I see someone already posted a very similar suggestion to what I put here.

Understood and we'll apply such solution, so you can leave the TMS VCL UI Pack source untouched and can control this at project level.

1 Like