Jump to content
Sign in to follow this  

updating the path

Recommended Posts


I have this program that is a completely manual install. so I'm sitting here half an hour after I should have left work writing a install for it... I have to check the path and make sure these three items are there... this could be made a UDF, and I'm sure I will, once I get around to it... for now, if you want to do it, you can...

;checking the path
$_path = EnvGet("PATH")
if StringInStr($_path, "%FORTE_ROOT%\install\bin") = 0 Then $newpath = $_path & ";%FORTE_ROOT%\install\bin"
if StringInStr($_path, "%FORTE_ROOT%\userlib") = 0 Then $newpath = $_path & ";%FORTE_ROOT%\userlib"
if StringInStr($_path, "C:\Program Files\Caminus\Common") = 0 Then $newpath = $_path & ";C:\Program Files\Caminus\Common"

RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment", "PATH", "REG_SZ", $newpath)

Edited by emmanuel

"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post

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
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.