' If not present, then create %SystemDrive%\DAT\dat.conf\r
\r
Function DAPL_setup()\r
- Dim sSysDrive, DatFolder, SrcFile, WshShell, fso\r
+ Dim sSysDrive, SrcFile, DstFile, WshShell, fso\r
\r
Set WshShell = CreateObject("WScript.Shell")\r
Set fso = CreateObject("Scripting.FileSystemObject")\r
SrcFile = Session.Property("INSTALLDIR") & "dat.conf"\r
\r
If fso.FileExists(SrcFile) Then\r
- On Error Resume Next \r
+ On Error Resume Next \r
sSysDrive = Session.Property("WindowsVolume")\r
' sSysDrive = WshShell.ExpandEnvironmentStrings("%SystemDrive%") \r
- DatFolder = sSysDrive & "DAT"\r
- If fso.FolderExists(DatFolder) Then\r
- ' Preserve existing %SystemDrive%\DAT\r
- Exit Function\r
- End if\r
- ' create %SystemDrive%\DAT & install dat.conf\r
- fso.CreateFolder DatFolder\r
- If Err Then\r
- ErrMsg "Unable to create folder %SystemDrive%\DAT"\r
+ ' WindowsVolume includes root \, where %SystemDrive% does not.\r
+ DstFile = sSysDrive & "DAT\dat.conf"\r
+ If fso.FileExists(DstFile) Then\r
+ ' Preserve existing %SystemDrive%\DAT\dat.conf\r
Exit Function\r
End if\r
- fso.CopyFile SrcFile, DatFolder & "\dat.conf"\r
+ fso.CopyFile SrcFile, DstFile\r
End if\r
End Function\r
\r