Jump to content

Chaining .msi's with VBS for MDT


speilbwm

Recommended Posts

I'm trying to add some applications to my task sequence in Microsoft Deployment Toolkit. One of the programs, Bentley Microstation is giving me some trouble. The program does not have silent switches for the main installer, but can be broken up into several .msi's that need to be installed in order. (One .msi is the program, the rest are framework and dependency installs.)

I would like this app to show up as 1 application in MDT. I don't want to have to add multiple "applications" to a task sequence to install one program.

We also need to do some custom registry and file changes after the install. My current working solution is a .bat file that cscripts 4 vb scripts in a row that install the .msi's. Then, the batch file makes some file changes, and regedit commands. Then, in MDT I just add the single .bat file as my application. Again, this is working - but causes me to have 5 files, and this just gets messy and isn't very modular.

The reason I cant just add msiexec's to the .bat file is that for some reason MDT does not like UNC paths in command prompt.

Can anybody here think of a better way to do this? I tried to create a vbscript that would do everything, but that was more difficult than it sounds and the commands wouldn't wait for each other to finish, resulting in failure.

Thanks

Edited by speilbwm
Link to comment
Share on other sites


I would like this app to show up as 1 application in MDT. I don't want to have to add multiple "applications" to a task sequence to install one program.

...

Can anybody here think of a better way to do this? I tried to create a vbscript that would do everything, but that was more difficult than it sounds and the commands wouldn't wait for each other to finish, resulting in failure.

What you want is an application bundle - add each "split" MSI package to the applications folder, and then go into the properties and hide them all via the "hide" checkbox in the application's properties.

Next, create a new application bundle in the applications node, and then on the dependencies tab, add each MSI it needs to install, in the order necessary (bundles install dependencies in order, from top to bottom, in that list), and then that application bundle will show up as an "Application" during the wizard (or to be installed directly from a task sequence, as need be).

Link to comment
Share on other sites

thanks for the replies, guys.

tripedacus:

Mapping a network drive is not a good solution for me, because I would have to have a vbscript to map / unmap the network drives anyways.

Remember, the MDT won't pass UNC thru CMD, so I couldn't just add like a 'net use' to my batch file.

Also, my deployment task sequence contains many reboots, and the mapped drives won't reconnect after reboot, and that is another issue entirely I think.

cluberti:

I have to look into this application bundle, the solution sounds like it will work - but doesn't sound very modular.

I need to repeat this with possibly many other installs, and keeping track of all the dependencies would get messy.

The goal is to get rid of all of the .bat files and .vbs scripts that I have to keep track of and condense them into one script.

Also, I have other commands and administrative tasks I would like to add to some of my program installs, so I'm still on the look out for a working .vbs.

Edited by speilbwm
Link to comment
Share on other sites

here is what I have so far for one of them:

(it doesn't work, seems to hand after the first .msi)

'On Error Resume Next

'Define all the variables

Dim strInstallMS1
Dim strInstallMS2
Dim strInstallMS3
Dim objShell
Dim objFilesys

'Set all the variables

strComputer = "."

strInstallMS1 = "msiexec.exe /i ""\\lexapps1\apps\cadd\Bentley\V8i\Installation Files\MicroStation 08.11.07.443\MicroStation.msi"" ADDLOCAL=ALL /quiet /norestart"

strInstallMS2 = "msiexec.exe /i ""\\lexapps1\apps\cadd\Bentley\V8i\Installation Files\MicroStation 08.11.07.443\DgnThumbnailProviderx86.msi"" /quiet /norestart"

strInstallMS3 = "msiexec.exe /i ""\\lexapps1\apps\cadd\Bentley\V8i\Installation Files\MicroStation 08.11.07.443\DgnIFilterSetupx86.msi"" /quiet /norestart"

Set objShell = WScript.CreateObject("WScript.Shell")

Set objFilesys = CreateObject("Scripting.FileSystemObject")

'Install the programs

objShell.Run strInstallMS1,0,True
objShell.Run strInstallMS2,0,True
objShell.Run strInstallMS3,0,True

'Patching the program files

objFilesys.MoveFile "C:\Program Files (x86)\Bentley\MicroStation V8i (SELECTseries)\MicroStation\config\mslocal.cfg", "C:\Program Files (x86)\Bentley\MicroStation V8i (SELECTseries)\MicroStation\config\OOTB_mslocal.cfg"

objFilesys.CopyFile "\\lexapps1\apps\CADD\Bentley\TS_Workspaces\TS_Dataset_09Q4b_v8i\MH_Template_Configs\mslocal.cfg", "C:\Program Files (x86)\Bentley\MicroStation V8i (SELECTseries)\MicroStation\config\"

'Clean up used ram

Set objShell = Nothing
Set objFilesys = Nothing
set strComputer = Nothing
set strInstallMS1 = Nothing
set strInstallMS2 = Nothing
set strInstallMS3 = Nothing

Edited by speilbwm
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...