emmanuel Posted June 10, 2004 Posted June 10, 2004 I've got a program that's misbehaving, it's not properly seeing the changes I'm making in the registry to the path, as such:$NEWPATH = EnvGet("PATH") If (StringInStr($NEWPATH, "%FORTE_ROOT%\install\bin") = 0) or (StringInStr($NEWPATH, "c:\forte\install\bin") = 0) Then $NEWPATH = "%FORTE_ROOT%\install\bin;" & $NEWPATH If (StringInStr($NEWPATH, "%FORTE_ROOT%\userlib") = 0) or (StringInStr($NEWPATH, "c:\forte\userlib") = 0) Then $NEWPATH = "%FORTE_ROOT%\userlib;" & $NEWPATH If StringInStr($NEWPATH, "C:\Program Files\Caminus\Common") = 0 Then $NEWPATH = $NEWPATH & ';"C:\Program Files\Caminus\Common"' RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment", "PATH", "REG_SZ", $NEWPATH) EnvSet("PATH", $NEWPATH) EnvUpdate() I put a msgbox in, and it shows the path is modified as I want it to be:MsgBox(0,"path", Envget("PATH")) I even split the script into two parts, one that changes the path, the other that runs the app... I also tried this:Envset("PATH",Envget("PATH")) EnvUpdate() as another way attempting to inflict the change that I'd made on the app. The program I'm running launches a self extracting winzip, then runs an extracted app, which is what's not seeing the updated path.... anyone else ever have to do similar dances? any suggestions? "I'm not even supposed to be here today!" -Dante (Hicks)
Holger Posted June 10, 2004 Posted June 10, 2004 The first thing I see is that the path-entry at the pc-systems I know are "REG_EXPAND_SZ"-types... Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView
emmanuel Posted June 11, 2004 Author Posted June 11, 2004 Holger said: The first thing I see is that the path-entry at the pc-systems I know are "REG_EXPAND_SZ"-types...well, color me green and call me a pickle. I'll try that. "I'm not even supposed to be here today!" -Dante (Hicks)
emmanuel Posted June 11, 2004 Author Posted June 11, 2004 damn, no change. I think it might just be something as stupid as the app needing the %forte_root%\install\bin to be the first thing in the path... how's that for obnoxious? "I'm not even supposed to be here today!" -Dante (Hicks)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now