From: stansmith Date: Fri, 24 Aug 2007 20:28:37 +0000 (+0000) Subject: [WinOF] InstallShield - perserve existing %SystemDrive%\DAT\dat.conf X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=f2245f05eabbba83b11f2c2fb3fc14e5c34217e8;p=~shefty%2Frdma-win.git [WinOF] InstallShield - perserve existing %SystemDrive%\DAT\dat.conf git-svn-id: svn://openib.tc.cornell.edu/gen1@777 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- diff --git a/branches/WinOF/InstallShield/CustomActions.vbs b/branches/WinOF/InstallShield/CustomActions.vbs index 18f56c48..0d53fe79 100644 --- a/branches/WinOF/InstallShield/CustomActions.vbs +++ b/branches/WinOF/InstallShield/CustomActions.vbs @@ -764,7 +764,7 @@ End Sub Sub DAPLsetup() - Dim sSysDrive, DatFolder, SrcFile, WshShell, fso + Dim sSysDrive, DstFile, SrcFile, WshShell, fso Set WshShell = CreateObject("WScript.Shell") Set fso = CreateObject("Scripting.FileSystemObject") @@ -774,18 +774,12 @@ Sub DAPLsetup() If fso.FileExists(SrcFile) Then On Error Resume Next sSysDrive = WshShell.ExpandEnvironmentStrings("%SystemDrive%") - DatFolder = sSysDrive & "\DAT" - If fso.FolderExists(DatFolder) Then - ' Preserve existing %SystemDrive%\DAT + DstFile = sSysDrive & "\DAT\dat.conf" + If fso.FileExists(DstFile) Then + ' Preserve existing %SystemDrive%\DAT\dat.conf Exit Sub End if - ' create %SystemDrive%\DAT & install dat.conf - fso.CreateFolder DatFolder - If Err Then - ErrMsg "Unable to create folder %SystemDrive%\DAT" - Exit Sub - End if - fso.CopyFile SrcFile, DatFolder & "\dat.conf" + fso.CopyFile SrcFile, DstFile End if End Sub