Skip to content

Conversation

@liorda
Copy link

@liorda liorda commented Mar 11, 2013

No description provided.

@AraHaan
Copy link

AraHaan commented May 4, 2017

What if I want my command line program that adds things to path to actually modify the path variable on the process that runs my command line program (in this case cmd.exe or powershell).

It already modifies it to the current user and system path for using whatever program in the folder specified a lot easier. However doing it immediately after calling the process is a challenge because of the fact they have to remember to restart powershell or cmd.exe. This would make it a lot easier. However I would have to be able to get all instances of powershell or cmd.exe currently running and probably inject an dll to make the path change (in this case update the path that the process currently has cached to the updated one without restarting them). This is my goal to make setting and adding to path so much simpler and similar to setting to stuff on linux.

If you are interested take a look at this repository that uses this library (as an static library and compiled in Visual C++ 2010 Express as VS2015 gives compile errors): https://github.com/DecoraterBot-devs/pthmgr/

Also on this pull request I think it is a good idea to do this as well. However adding a few functions and adding yet another dll that overwrites cmd.exe and powershell's path while they are running without having to restart them would also be good as well to help me on my pthmgr as much as possible.

@liorda
Copy link
Author

liorda commented May 7, 2017

I agree this is a good idea. In addition, your application needs to listen to the WM_SETTINGCHANGE broadcast (see here).

@AraHaan
Copy link

AraHaan commented May 7, 2017

Alright, also can you plz also include my patches to the code that allows me to compile my application with editenv being an static library? This is so it helps me not have to make the patches manually when I update the editenv sources on the repo.

Also some of the broadcast stuff I might not know yet on listening to on console applications.

(I know more python and Visual Basic than I do on C and C++, also all I know about C/C++ is from either trial and error, videos of people coding in them on YouTube, or places like some rare documentation sites that might have examples of usage.)

@liorda
Copy link
Author

liorda commented May 8, 2017

Sorry, I'm not the maintainer of this repo, and it seems abandoned. Create a PR with your patches to my fork and I'll see what I can do.

@AraHaan
Copy link

AraHaan commented May 8, 2017

Alright, also you alright if I also provide the Visual Studio 2010 Express edition solution and project files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants