I'm trying to create the Outlook profile for each user as part of the logon script using modprof.exe and two custom *.prf files: outlook1.prf has the setting of PathToPersonalFolders=H:\%username%.pst; meanwhile, outlook2.prf just commented out these personal folder sections. My objective is first to check whether the user has Outlook profile, if NOT then go ahead create the profile either with or without @userid.pst in the user home directory, mapped as H drive (I figured that there are two possibilities: 1/user has no Outlook profile and no existing H:\@userid.pst and 2/user has no Outlook profile and an existing H:\@userid.pst file.). Problem is followed:

** First time logon, scripts works fine. On the second logon, same W2K Pro, Outlook profile gone!
Your help is greatly appreciated.
Here is the script (I'm using kix32.exe version 4.20.0:

;Check to see if Outlook profile already created, if not, create one for this particular user:
$regkey = ReadValue("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles","DefaultProfile")

SELECT

CASE $regkey <> 0 AND 0=EXIST("H:\@userid.pst")

? shell "%comspec% /c c:\winnt\modprof.exe -P c:\winnt\outlook1.prf" ;Create Outlook profile with @userid.pst file

CASE $regkey <> 0 AND 1=EXIST("H:\@userid.pst")

? shell "%comspec% /c c:\winnt\modprof.exe -P c:\winnt\outlook2.prf" ;Create Outlook profile without @userid.pst file

ENDSELECT