How not to inherit system environment when running programms
Moderators: Hacker, petermad, Stefan2, white
How not to inherit system environment when running programms
When you run a progam from a commander the program inherits all system environment from the commander, but sometimes it's not useful (in my case it's always not) - I prefer to take it from the system environment as though the program is being started from windows explorer. Is there a way to configure it?
- SanskritFritz
- Power Member
- Posts: 3693
- Joined: 2003-07-24, 09:25 UTC
- Location: Budapest, Hungary
- SanskritFritz
- Power Member
- Posts: 3693
- Joined: 2003-07-24, 09:25 UTC
- Location: Budapest, Hungary
- ghisler(Author)
- Site Admin
- Posts: 50505
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
If anyone can tell me how to get access to the system environment, please let me know! To my knowledge there are no functions to do it, except for searching through the registry, but the location isn't documented and may vary between Windows versions...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- SanskritFritz
- Power Member
- Posts: 3693
- Joined: 2003-07-24, 09:25 UTC
- Location: Budapest, Hungary
2ghisler(Author)
Maybe you could try to contact Mark Russinovich from http://www.sysinternals.com/
He wrote the wonderful Process Explorer, which can show the environment variables for any process.
Maybe you could try to contact Mark Russinovich from http://www.sysinternals.com/
He wrote the wonderful Process Explorer, which can show the environment variables for any process.
I switched to Linux, bye and thanks for all the fish!
- ghisler(Author)
- Site Admin
- Posts: 50505
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Hmm, I don't want to peek into other program's environment, this is certainly done with dirty tricks like dll injection into the program's process space. Such low level stuff may or may not work in newer Windows versions.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com