Load XY with Alternate Icon

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
TestMeister
Posts: 228
Joined: 04 Feb 2008 20:17

Load XY with Alternate Icon

Post by TestMeister »

Periodically I need to load XY as Admin and when I do, I would like to have it use a different icon for confirmation. I understand the XYplorer.ini allows specification of the icon but I would not otherwise need a different ini and would like to avoid duplicating it.

Is there an undocumented launching switch that would specify the program icon on the fly or perhaps another method?

jupe
Posts: 3292
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Load XY with Alternate Icon

Post by jupe »

No, there is a documented scripting command though, that you can run at launch, you should try looking it up. SC appicon.

TestMeister
Posts: 228
Joined: 04 Feb 2008 20:17

Re: Load XY with Alternate Icon

Post by TestMeister »

Thanks, I should have checked the scripts :oops:

Here is my syntax
/script=::appicon "ABA";

It always gives me a popup selection choice. Is it possible to just have it use the specified icon?
Also, it modifies the IconFile in the Xy ini so it requires me to specify appicon for non-admin launches.

highend
Posts: 14571
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Load XY with Alternate Icon

Post by highend »

You're missing proper quoting for the content of the script^^

Code: Select all

E.g.:
/script="::appicon 'ABA';"
/script='::appicon "ABA";'
One of my scripts helped you out? Please donate via Paypal

TestMeister
Posts: 228
Joined: 04 Feb 2008 20:17

Re: Load XY with Alternate Icon

Post by TestMeister »

Yep, I've been getting away without using the encapsulating double quotes and the now is first time I needed to nest quotes so it fell over.
It now works as expected, thanks!

jupe
Posts: 3292
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Load XY with Alternate Icon

Post by jupe »

There are other alternatives, such as you could launch your admin session as read only, or set a CEA on exit event to always set the default icon on exit.

Post Reply