Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Registry Entries
Message
General information
Forum:
Visual FoxPro
Category:
Installation, Setup and Configuration
Miscellaneous
Thread ID:
00608367
Message ID:
00610940
Views:
21
>OK I see the registry class. Now what? Not sure where to go from here? Is there any examples or documentation on this class?
>
*********
I know what you mean. That is exactly what I thought when I looked at it. I had experience with regedit so I knew what I wanted to do. (I just looked at some other vendor's stuff to see what they did). The secret for me was to remember that if you are writing a folder, you must put a backslash at the end. If not, then you are writing a key with a value. I found that the WSH was easier (thanks to George and Ed). Here is a way to create an entry for your program "MyProgram" with the installation path "\MyDirectory\".
oShell = Createobject("WScript.Shell")
lcKey = "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\MyProgram.exe\"
lcValue = "" && no value when you are writing a key
llResult = oShell.RegWrite(lcKey, lcValue, 1)

* now write a value for your key
lcKey = "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\MyProgram.exe\Path"
lcValue = "\MyDirectory\"
llResult = oShell.RegWrite(lcKey, lcValue)
Reading the registry is about the same.
oShell = Createobject("WScript.Shell")
lcValue = oShell.RegRead(lcKey)
Dr. Ken A. McGinnis
Healthcare software design
Previous
Reply
Map
View

Click here to load this message in the networking platform