CMD opened by XYplorer does not react to the changes of the system variable

Things you’d like to miss in the future...
Forum rules
:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:

:info: Please include the following information:
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".

:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:
hyzhangzhy
Posts: 27
Joined: 05 Jan 2017 02:52

Re: CMD opened by XYplorer does not react to the changes of the system variable

Post by hyzhangzhy »

Thanks, Don, for the research.

And thanks for this link: https://social.msdn.microsoft.com/Forum ... arpgeneral, I also get something from it.

It seems create a separate thread which just for starting a new cmd window and then quit immediately is a better solution.

But VB6 can not create muti thread, make things harder... Some VB cons. :cry: :cry: :cry:

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

Re: CMD opened by XYplorer does not react to the changes of the system variable

Post by jupe »

I had a think about this issue, and came up with this if it is of interest, it's a pretty dirty workaround.

You would attach it to a button etc, and it launches the run dialog and starts a command prompt in your current path, where the new environment variables should be available.

Code: Select all

	run "explorer.exe shell:::{2559a1f3-21d7-11d4-bdaf-00c04f60b9f0}";
	wait 350;
	sendkeys "cmd /s /k cd ""<curpath>""{Enter}";

Post Reply