Hi,
I am in the process of setting up a new Business Objects repository, as a replacement for the existing one. This needs to be rolled out to all of our Business Objects users as transparently, and as smoothly, as possible.
I started writing a script to update all the necessary files on each users local machine. This was done as a BAT file. However, the users will also need a new ODBC system DSN setup. I found a way to do this via VBScript. S onow I have two different script files.
I would like to tidy these up into a single script. As such, I would like to know how the BAT file would need to be written in VBScript to produce the same results.
The current scripts are as follows:
1 - VBScript to create new DSN:
Dim oWshShell
Const cRegKey1 = "HKLM\Software\ODBC\ODBC.INI\BORep\"
Const cRegKey2 = "HKLM\Software\ODBC\ODBC.INI\ODBC Data Sources\"
Set oWshShell = CreateObject ("WScript.Shell")
oWshShell.RegWrite cRegKey1 & "Driver","C:\\WINDOWS\\System32\\sqlsrv32.dll"
oWshShell.RegWrite cRegKey1 & "Server","MAINT34"
oWshShell.RegWrite cRegKey1 & "LastUser","BOREP"
oWshShell.RegWrite cRegKey1 & "Description","Business Objects Repository"
oWshShell.RegWrite cRegKey2 & "BORep","SQL Server"
set oWshShell = Nothing
2 - BAT file to delete and copy Bus Obj files:
REM Update local files to redirect Business Objects to the new repository
REM ** rename the old LSI files **
rename "%userprofile%\Application Data\Business Objects\Business Objects 6.0\lsi\*.lsi" *.old
REM ** copy the new shared connections **
copy G:\BIS\Update\sdac.lsi "%userprofile%\Application Data\Business Objects\Business Objects 6.0\lsi\"
REM ** rename the old BOMAIN.KEY file **
rename "C:\Program Files\Business Objects\BusinessObjects Enterprise 6\LocData\bomain.key" bomain.old
REM ** copy the new BOMAIN.KEY file **
copy G:\BIS\Update\bomain.key "C:\Program Files\Business Objects\BusinessObjects Enterprise 6\LocData\"
REM ** clear out all previously downloaded universes **
rmdir /S /Q "%userprofile%\Application Data\Business Objects\Business Objects 6.0\universes\Universe\"
del /Q "%userprofile%\Application Data\Business Objects\Business Objects 6.0\universes\*.*"
Any help with this would be greatly appreciated.
Many thanks,
Simon
I am in the process of setting up a new Business Objects repository, as a replacement for the existing one. This needs to be rolled out to all of our Business Objects users as transparently, and as smoothly, as possible.
I started writing a script to update all the necessary files on each users local machine. This was done as a BAT file. However, the users will also need a new ODBC system DSN setup. I found a way to do this via VBScript. S onow I have two different script files.
I would like to tidy these up into a single script. As such, I would like to know how the BAT file would need to be written in VBScript to produce the same results.
The current scripts are as follows:
1 - VBScript to create new DSN:
Dim oWshShell
Const cRegKey1 = "HKLM\Software\ODBC\ODBC.INI\BORep\"
Const cRegKey2 = "HKLM\Software\ODBC\ODBC.INI\ODBC Data Sources\"
Set oWshShell = CreateObject ("WScript.Shell")
oWshShell.RegWrite cRegKey1 & "Driver","C:\\WINDOWS\\System32\\sqlsrv32.dll"
oWshShell.RegWrite cRegKey1 & "Server","MAINT34"
oWshShell.RegWrite cRegKey1 & "LastUser","BOREP"
oWshShell.RegWrite cRegKey1 & "Description","Business Objects Repository"
oWshShell.RegWrite cRegKey2 & "BORep","SQL Server"
set oWshShell = Nothing
2 - BAT file to delete and copy Bus Obj files:
REM Update local files to redirect Business Objects to the new repository
REM ** rename the old LSI files **
rename "%userprofile%\Application Data\Business Objects\Business Objects 6.0\lsi\*.lsi" *.old
REM ** copy the new shared connections **
copy G:\BIS\Update\sdac.lsi "%userprofile%\Application Data\Business Objects\Business Objects 6.0\lsi\"
REM ** rename the old BOMAIN.KEY file **
rename "C:\Program Files\Business Objects\BusinessObjects Enterprise 6\LocData\bomain.key" bomain.old
REM ** copy the new BOMAIN.KEY file **
copy G:\BIS\Update\bomain.key "C:\Program Files\Business Objects\BusinessObjects Enterprise 6\LocData\"
REM ** clear out all previously downloaded universes **
rmdir /S /Q "%userprofile%\Application Data\Business Objects\Business Objects 6.0\universes\Universe\"
del /Q "%userprofile%\Application Data\Business Objects\Business Objects 6.0\universes\*.*"
Any help with this would be greatly appreciated.
Many thanks,
Simon