You could just run the code below to see exactly what your Environemnt is:
And then dedeuce the reason for the trouble you had on the basis of what you get.
Code:
Dim indx As Integer
Dim EnvString As String
Dim strSize As Integer
indx = 1
msg = "Current Envoronment."
Do
'Get environment variable.
EnvString = Environ$(indx)
'Check if the result is valid or a null string
If Len(Trim(EnvString)) > 0 Then
'Get length
strSize = Len(EnvString)
msg = msg & "Env " & indx & ":- " & Trim(EnvString) & vbCrLf
End If
indx = indx + 1
Loop Until EnvString = ""
MsgBox msg, 64, "Environment."
Clipboard.Clear
Clipboard.SetText msg, vbCFText
Here are the results from running on my Win95 sys:
Code:
Current Environment.
Env 1:- TMP=C:\WINDOWS\TEMP
Env 2:- TEMP=C:\WINDOWS\TEMP
Env 3:- PROMPT=$p$g
Env 4:- winbootdir=C:\WINDOWS
Env 5:- COMSPEC=C:\WINDOWS\COMMAND.COM
Env 6:- PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\PROGRA~1\SUPERC~1\BIN
Env 7:- CMDLINE=WIN
Env 8:- windir=C:\WINDOWS
Env 9:- BLASTER=A220 I5 D1 T4
DocZaf
{;->