Page 2 of 2

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

Posted: 12 Mar 2018 10:01
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:

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

Posted: 12 Mar 2018 10:27
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}";