Jump to content

Recommended Posts

I've written a helper script that I can use when installing applications to automatically update the system path (if necessary). Useful for installng CLI programs such as nmap.

Anyway, setting the path in NT is easy: update the regkey and call envupdate(). Perfect, everytime (and THANK YOU to whoever wrote that function :-).

9x is tricker, though. Based on my research, it seems that updating it through autoexec.bat is the best and most reliable way of doing it. So, I scripted that, and have that working perfectly after a reboot. However, I'd like to enable Win9x users to use the program without a reboot, just like NT users can do.

Is there any way to do this? envupdate() doesn't update the path on 9x (at least not through autoexec.bat), and I haven't been able to figure out any other way to do this. Any suggestions?


Link to post
Share on other sites


There's a program on the W98 CD called winset.exe. This can be used to set global environmental variables. I seem to remember having to run the set command first - but I'm not sure.

It would look something like:

set path=%path%;newpath

winset path=%path%;newpath

it's worth a try..

Link to post
Share on other sites

There's a program on the W98 CD called winset.exe. This can be used to set  global environmental variables.


This is perfect! I've never heard of this program before, but it does exactly as you said. Rock on.

Any chance this capability could be added to the envupdate function? Or built into AutoIt in some other way? It'd be nice not to have to deal with an extra executable.

Either way, though, I'm quite happy right now. :-) Thanks again.

Edited by nitro322
Link to post
Share on other sites

Ok, it's not perfect. It does apply the new path to all future processes, but still not explorer.exe itself. So, if I launch a new command prompt, then it works. However, if I try to run the command from explorer itself (or and application that gets the path directly from explorer), then it fails.

Sigh, so close... But, this will still work well enough. I need this functionality for 6 applications, and only 1 of them still fails. I'll just force a reboot on that one.

Anyway, thanks again.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...