Dear,

Solved?

To solve possible problems with W95 systems you can verify the availability
of profile we are using following code to calculate desktop location. The
benefits of windows 95 is: the user profiles will be there.
We are using $desktop_nt, $startup_nt, $desktop_w95 and $startup_w95.
code:
  $debug_mode="yes" ; -yes/no -
;
IF (@inwin = 1)
$NT_mode="yes"
ELSE
$NT_mode="no"
ENDIF

; --------------------------------------------------------------------------

$desktop_nt="c:\winnt\profiles\"+LCASE($user)+"\Desktop"
;
IF ($NT_mode = "yes")
IF (len(%userprofile%) <> 0)
$desktop_nt=LCASE(%userprofile%)+"\Desktop"
ENDIF
;
IF ($debug_mode = "yes")
? " desktop_nt = "+$desktop_nt
ENDIF
ENDIF
;
$desktop_nt=LCASE($desktop_nt)

$startup_nt="c:\winnt\profiles\"+LCASE($user)+"\Startup"
;
IF ($NT_mode = "yes")
IF (len(%userprofile%) <> 0)
$startup_nt=LCASE(%userprofile%)+"\Startup"
ENDIF
;
IF ($debug_mode = "yes")
? " startup_nt = "+$startup_nt
ENDIF
ENDIF
;
$startup_nt=LCASE($startup_nt)

; --------------------------------------------------------------------------

$desktop_w95="c:\windows\desktop"
IF (exist("c:\windows\profiles\"+LCASE($user)+"\desktop") = 1)
$desktop_w95="c:\windows\profiles\"+LCASE($user)+"\desktop"
ENDIF
;
IF ($NT_mode <> "yes")
IF ($debug_mode = "yes")
? " desktop_w95 = "+$desktop_w95
ENDIF
ENDIF
;
$desktop_w95=LCASE($desktop_w95)

$startup_w95="c:\windows\startup"
IF (exist("c:\windows\profiles\"+LCASE($user)+"\startup") = 1)
$startup_w95="c:\windows\profiles\"+LCASE($user)+"\startup"
ENDIF
;
IF ($NT_mode <> "yes")
IF ($debug_mode = "yes")
? " startup_w95 = "+$startup_w95
ENDIF
ENDIF
;
$startup_w95=LCASE($startup_w95)

Of course we prefer the usage of registry values. It replace the NT part. This part
looks like:
code:
   $ikey="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"
IF (ExistKey($ikey) = 0)
$desktop_nt=ReadValue($ikey, "Desktop")
IF (LEN($desktop_nt) = 0)
$desktop_nt="c:\winnt\desktop"
IF (exist("c:\winnt\profiles\"+LCASE($user)+"\desktop") = 1)
$desktop_nt="c:\winnt\profiles\"+LCASE($user)+"\desktop"
ENDIF
ENDIF
ENDIF

greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA