General information
Category:
Coding, syntax & commands
Title:
Changing User's Windows path programatically
Environment versions
Network:
Windows 2003 Server
Hi all,
I am working with a Lotus Domino developer to integrate some aspects of a document database into a VFP app. He has given me a dll to call which has a number of functions I can use to query the Domino database. These did not work at first until I put a path to the Lotus Notes exe that does the actual calls into the Domino database. I had to append C:\Program Files\Lotus\Notes to my user path (development machine).
But I don't really want to do this for 40 odd machines. So I went looking for where the "Path" variable is stored and came up with:
HKEY_LOCAL_MACHINE|SYSTEM\CurrentControlSet\Control\Session Manager\Environment
and then the PATH variable.
Questions: I can probably figure out how to write to this registry entry but...
1) should I? Is this somehow "old school" or might it cause problems?
2) should I be writing to the "CurrentControlSet" or I noticed that when I set this var on my machine, it also showed up in the "ControlSet003" of the registry (probably pertaining to who I am logged in as).
My idea was to query the PATH at system startup and if the required Lotus Notes pathing is not in the current path, add it via the registry (with perhaps forcing the user to quit VFP as I think the change may not take effect right away).
Thoughts?
Albert
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only