Forum Discussion
System environment variable Patch and registry
Interesting, I don't want to tell you or say information that is not accurate or make you waste your time searching and testing materials etc. I can't figure this one out I believe and I wish I had more time to help you out, since it might not be that hard or probably a simple option or a wrapper... (I was trying to debug this with copilot to see if this can help you and here is what I found, but it seems like you already use the path to bypass your toy.exe, so)
It should work as follow:
- When you run toy from cmd it use <Path> env variable to locate toy.exe in <C:\Windows\
test>
- When you do it from the registry it doesn't use the <Path> env variable in the same way, that's why when you specify the full path <C:\Windows\test\toy.exe> work, but simply using <toy> does not
Proposed solution:
To make sure <toy.exe> run as it should from the registry, you need to use the full path in the registry command as this bypass the need for <Path> env variable and ensure that the correct file is accessed:
<HKEY_CLASSES_ROOT\DesktopBackground\Shell\toy\command @="C:\Windows\test\toy.exe">
By using the full path in the registry command it should work even with where <toy.exe> is accessed regardless of diff in env variable or path.
I was thinking that if you were to use SSH to access a physical desktop from a virtual location you could have a sync problem, let me know if I can look furtner to help you out!
Have a great evening!