Forum Discussion
vadimnj
Dec 29, 2024Copper Contributor
System environment variable Patch and registry
Hi folks!
I ran into a stupid problem. I don't even know where to start digging.
Added a system environment variable. So, now Path looks like:
C:\Windows\test;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\
there's only one file C:\Windows\test\toy.exe, it's just open message box and closing. The problem is: if I run "toy" from command prompt, it works perfectly, wherever cmd opened. But it doesn't work from registry: HKEY_CLASSES_ROOT\DesktopBackground\Shell\toy\command default data "toy". I see it when right click on Desktop, and when I click toy, just nothing happened. If I change command default data to C:\Windows\test\toy, it works.
I would be very grateful if someone could suggest some idea. Thank you.
9 Replies
Sort By
- vadimnjCopper Contributor
I forgot to mention. If I move toy.exe from C:\Windows\test\toy.exe to C:\Windows\toy.exe, it runs from registry commad “toy” perfectly. How is it possible?
- RAJUMATHEMATICSMSCIron Contributor
Because this C:\Windows\ path already added
- ARMX86Copper Contributor
Hi there, hope you are doing well! Could you be more precise on what is your intention?
HKEY_CLASSES mainly those files are used for reference, and it might not contain the structure required for your "toy" in order to work, look for your system type first if
64bits
32 bits
Those are 2 different architecture style, as it might work, but not how it should be...
Please, try to include more details of your issue if it's simply to use the "toy" from cmd or why would you want to run it from the HKEY_ROOT?
Best regards!
- vadimnjCopper Contributor
Ok, here's details:
here's file location C:\Windows\test\toy.exe
this my registry key
HKEY_CLASSES_ROOT\DesktopBackground\Shell\toy\command @="toy"
this is system variable Path: C:\Windows\test;C:\Windows\system32;C:\Windows;..... and so on
when I open command prompt (let say on desktop location) type: toy and enter, it works, so the path C:\Windows\test works, but the same command from registry doesn't. So, in this case path C:\Windows\test doesn't work and it drives me crazy. I don't understand at all how this is possible.- ArmandCopper Contributor
In this case what you could do is:
1- You verify the integrity of the application files, from your main repository folder. Not the HKEY_LOCAL
...at this point I am not sure of what the current problem exactly however, you can run a debug on your application to check files integrity.
x- You can use a checksum validation to verify whether the application function and logic follow the proper path in order to reach the consensus.
xx- If nothing is found, you should try a different checksum parity bytes or check in the
Microsoft Learn Integrity streams
If you cannot see any validation files or a difference, since I suppose you have more than 1 folder containing the same file?
I would check the latest update on my server-pc-computer, I am thinking that if you did an installation from a different architecture type, then, it's possible that the controlling route now use an improved version and the initial function to start the app, or files have either move , or changed, or even be damaged...
If this app use a special package or limited files, and one files has been changed for X reason,
If the file is exactly the same, you could just change your diectory location to address the application when you call it.Let me know if you find the issue!
Best regards!