Declare Public Function RegOpenKeyExA Lib "advapi32" Alias "RegOpenKeyExA" (Byval HKEY As Long,Byval lpszSubKey As String,Byval dwreserved As Integer,Byval samDesired As Long, keyresult As Long) As Long
Declare Public Function RegQueryValueExA Lib "advapi32" _
Alias "RegQueryValueExA" _
(Byval HKEY As Long,_
Byval lpszValueName As String,_
Byval dwreserved As Integer, _
lpdwtype As Long, _
Byval lpData As String, _
readbytes As Long) As Long
Declare Public Function RegCloseKey Lib "advapi32" _
Alias "RegCloseKey" (Byval HKEY As Long) As Long
Declare Public Function GetPrivateProfileStringA Lib "kernel32" _
Alias "GetPrivateProfileStringA"_
(Byval AppName As String,_
Byval KName As Any, _
Byval Def As String, _
Byval RStr As String, _
Byval nSize As Integer, _
Byval FName As String) As Integer
Function TranslateEnviron (myKeyValue As String) As String
''We need this function for NT5 to find InternetExplorer 4.0 because it registers differently
'than any other version/operating system combination.
Dim pos As Integer
Dim EnvVar As String
Dim ValueEnvVar As String
Dim exePos As Integer
pos = Instr(1, myKeyValue, "%")
exePos=Instr(1,myKeyValue,".exe",1) 'Must be prior to .exe!
If ((pos > 0) And (pos < exePos)) Then
'We've located an environmental variable which needs substitution