From 1698d2bc20e4d9cb7f4c5fddf198e9bb9e4168bf Mon Sep 17 00:00:00 2001 From: stansmith Date: Thu, 28 Jun 2007 22:45:38 +0000 Subject: [PATCH] [WinOF] DAPLsetup CA, create %SystemDrive%\DAT if needed. git-svn-id: svn://openib.tc.cornell.edu/gen1@723 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- .../WinOF/InstallShield/CustomActions.vbs | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/branches/WinOF/InstallShield/CustomActions.vbs b/branches/WinOF/InstallShield/CustomActions.vbs index 0d30388d..ff373bc1 100644 --- a/branches/WinOF/InstallShield/CustomActions.vbs +++ b/branches/WinOF/InstallShield/CustomActions.vbs @@ -762,6 +762,33 @@ Sub OpensmServiceEvent() End Sub +Sub DAPLsetup() + Dim sSysDrive, DatFolder, SrcFile, WshShell, fso + + Set WshShell = CreateObject("WScript.Shell") + Set fso = CreateObject("Scripting.FileSystemObject") + + SrcFile = Session.Property("INSTALLDIR") & "dat.conf" + + 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 + 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" + End if +End Sub + + Sub ScheduleReboot Set objWMILocator = CreateObject ("WbemScripting.SWbemLocator") -- 2.41.0