can XY set its environment variables

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

can XY set its environment variables

Post by yusef88 »

like windows can i set environment variables inside XY?
To see the attached files, you need to log into the forum.

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

Re: can XY set its environment variables

Post by highend »

SC perm is (probably) what you're looking for.
One of my scripts helped you out? Please donate via Paypal

yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: can XY set its environment variables

Post by yusef88 »

Code: Select all

%tools%="D:\master\tools"
so i can run any file in this folder (via scripts) just by type "%tools%\app.exe"

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

Re: can XY set its environment variables

Post by highend »

Ok, you want real environment variables.

Since Vista, setx is available by default, for xp you need to download it...

Code: Select all

    run """%COMSPEC%"" /c SETX ""tools"" ""D:\master\tools""", , 2, 0;
One of my scripts helped you out? Please donate via Paypal

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: can XY set its environment variables

Post by bdeshi »

Wouldn't registry editing suffice?
Edit: nope, that requires logging off/on... :whistle:
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

klownboy
Posts: 4462
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

Re: can XY set its environment variables

Post by klownboy »

Be aware though that when setting Windows environmental variables in XYplorer that they may not be recognized "within" XY until a XY restart. See this User Environmental Variable Refresh and doing a refresh of environmental variables cid #505 won't help.

yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: can XY set its environment variables

Post by yusef88 »

thanks for help but this command worked for me http://www.xyplorer.com/xyfc/viewtopic.php?f=5&t=12063

Code: Select all

perm $path = "S:\Portables"
run "$path\geek.exe"
Last edited by yusef88 on 08 Sep 2014 20:27, edited 1 time in total.

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

Re: can XY set its environment variables

Post by highend »

By placing it above your first use of the variable?
One of my scripts helped you out? Please donate via Paypal

Post Reply