Hey, I need to know how to add my program to the environment variable PATH without messing up my PATH in the process... Of course I plan to use Environment.GetEnvironmentVariables() and set...

Anyone have some experience with this?

Google came up with This link.

I believe it does everything you need it to =) (I suggest following its instructions by the way and doing it as a set-up process or perform some kind of detection so you don't add it repeatedly during your program execution)

Comments

Google came up with This link.

I believe it does everything you need it to =) (I suggest following its instructions by the way and doing it as a set-up process or perform some kind of detection so you don't add it repeatedly during your program execution)

I'm actually a little stumped about adding the path to my .exe to the PATH in the first place, that article mainly has a method to notify windows of the changes, right?

It was one of the links on that page that contained the actual code.

You will need the rest of the code (about the notification) so that windows and the various windows updates to recognise the new path information.

Thank you sir you are an expert lifesaver! I accidentally hit the -1 button in my hurry, sorry :/

But at least we both know you did excellently!

This question has already been answered. Start a new discussion instead.