(How) does XYplorer access Windows Volatile Environment?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Marco
Posts: 2354
Joined: 27 Jun 2011 15:20

(How) does XYplorer access Windows Volatile Environment?

Post by Marco »

Ok, for people who don't know: the volatile environment is a location in Windows registry, located in "HKCU\Volatile Environment", which holds per-user, session-long, system-wide variables.
How can this be helpful? Here's my case: at startup I use to run a batch file. This batch file can be run also other times during my session, however with a slightly different behaviour, since this batch file was already run at startup. Here's where volatile environment comes handy: when run upon logon (i.e. the first time) the batch file writes there a key/variable, which survives all session long and will tell afterwards the script that next execution(s) won't be the first.

XY part: Xyplorer doesn't seem to read new values added to that registry section.
If I type in the address bar

Code: Select all

!echo %username%
I correctly see my username, and the key username resides there in the registry.
However, if I try to add a new variable/key named foo with value bar

Code: Select all

!reg add "HKCU\Volatile Environment" /v foo /d "bar" /f
and then try to read it

Code: Select all

!echo %foo%
all I can see is just %foo%. I'd expect to see bar, instead.

Can you reproduce that? And why this behaviour?

PS: someone may argue that the change is not broadcasted to the whole system. However, I tried to apply this variable with this utility ( http://barnyard.syr.edu/~vefatica/#SETENV ), which takes care of this problem, and the result is the same.

PPS: I'm running Windows 7.
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

admin
Site Admin
Posts: 66375
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: (How) does XYplorer access Windows Volatile Environment?

Post by admin »

What if you restart XY? Does this help?

Marco
Posts: 2354
Joined: 27 Jun 2011 15:20

Re: (How) does XYplorer access Windows Volatile Environment?

Post by Marco »

admin wrote:What if you restart XY? Does this help?
No, forgot to mention that I tried that.
And of course logging off and on again would flush out that key.
Can you reproduce that?
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

admin
Site Admin
Posts: 66375
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: (How) does XYplorer access Windows Volatile Environment?

Post by admin »

Marco wrote:
admin wrote:What if you restart XY? Does this help?
No, forgot to mention that I tried that.
And of course logging off and on again would flush out that key.
Can you reproduce that?
Hm, if a restart does not help, I don't see what I can do. XY reads all Environment Variables on startup and caches them.

Marco
Posts: 2354
Joined: 27 Jun 2011 15:20

Re: (How) does XYplorer access Windows Volatile Environment?

Post by Marco »

Ok...
I'll try to do a test on a windows xp machine to see if maybe is something related to windows 7 security features (kind of virtualization/sandboxing).
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

Marco
Posts: 2354
Joined: 27 Jun 2011 15:20

Re: (How) does XYplorer access Windows Volatile Environment?

Post by Marco »

Problem solved!
I was running XY from RocketDock, which apparently doesn't update its volatile environment variables.
Reference: http://jpsoft.com/forums/threads/volati ... ment.3660/
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

admin
Site Admin
Posts: 66375
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: (How) does XYplorer access Windows Volatile Environment?

Post by admin »

OK, thanks for solving it. :)

Post Reply