Thursday, July 24, 2008

MSI-repacking using WinInstall

Today we will see how to re-pack Adobe Acrobat Reader 9.0 so that we can deploy it using GPO. As we all know we are in need of .MSI file to use with group policy, to generate a .msi file we will be using “winInstall”
Download Link:http://rapidshare.com/files/197081183/WinINSTALL_LE.exe
Requirement:
VMWare Workstation.
Active Directory (recommended)
2 Fresh virtual machine setup on VMWare.
WinXP OS on virtual machine.
WinInstall

Step 1:
1st setup 2 virtual machines in vmware name one VM (virtual machine) as “wininstall” and other as “discover” and join them to your domain (if you are having AD)
If you are not having AD setup, put both VM on same network
wininstall IP: 10.10.10.10
discover IP: 10.10.10.11

Step 2:
Exceute “WinInstall.exe” on wininstall VM. Installation will create a shared folder named “winInstall”.

Step 3:
In VMWare we can take snapshot of our VM-state, go to “discover” right click and select “Take Snapshot”. We are taking snapshot so that we can reverse changes to discover vm for another use.



Step 4:
After completion of snapshot, click on start select run and type UNC to browse the shared folder “winInstall” that is on winisntall VM. In this share folder we want to browse “discover.exe” file.


Check the Discover.exe that we need.


Step 5:
Double click and run discover.exeYou will get a warning message as we are running this exe from network location Click Run.


Step 6:
On welcome screen click “Next”


Step 7:
Select the 3rd option “Before” and this is the 1st discovery of fresh system we are going to make.Click “Next”

Step 8:
Here you will give a name to Application as you like. I gave "AcrobatReader9.0”and notice in the Location for the file the output i.e., msi file will be created by default in the same UNC location but in the “Packages” folder file://10.10.10.10./WinINSTALL/Packages/AcrobatReader9.0/AcrobatReader9.msi
You can put your own path. If you are having AD then I will suggest to give UNC path to a shared folder on DC.Click “Next”.

Step 9:
Here you can specify path for application list, this list can be used with winInstall to manage. But I didn’t use it a lot. Even you can keep it blank.

Step 10:
Select the temporary drive for winInstall to save files. I have selected C drive, you can select any other if you have.Click “Next”.

Step 11:
Here select the drive on which you will be installing Acrobat reader, remember this location will be used on clients too, so if you select here other drive then that location should be present on Clients workstation too, otherwise installation will fail.I will suggest keeping default C: drive as every workstation will have C as its default location.Select C drive and click “Add”
Click “Next”.

After this step you will click on Finish on next screen, which will start discovery process of virtual machine.


Step 12:
As the discovery process finish you will get a message box.

Step 13:
Now when you click OK, it will prompt you to setup the program, so we need to copy Adobe Acrobat Reader 9.0 to VM before we go ahead and click OK.. We can copy from our local location and paste it in VM on the fly. It is not important to have setup file on VM, if you have it on CD-ROM then you can use it or can also give a UNC path to setup file.

You can see here, I copied Acrobat Reader v9.0.exe and now click OK button.



Step 14:
Now, browse the setup file, and click “Open”

Step 15:
Acrobat Reader setup will launch and complete the setup as normally we do.But remember to keep installation location as C: in setup also, as we have selected C: drive to scan for changes.


OK, now setup is complete.Step 16: VERY IMPORTANT TASK if you copy setup file to VM then delete it. Don’t forget to delete executable file.After deleting then take next step, if you run the setup from CD-ROM or UNC then go ahead to next step.
If your program needs a restart then go ahead and restart VM.Depending on this next step may change, as Acrobat reader doesn’t needs a restart, we can go ahead.

Step 17:
Again we need to run “discover.exe” using the same UNC path that we used before. This time you will get a different option to select.We need select “Perform the after snapshot” and click “Next”.

Step 18:
When you click Next, it will start discovery process again and here it will copy all the changes done to VM in comparision with previous discovery.Changes files and registry settings will be copied to UNC location that we specified in step 8.


Step 19:Discovery process is complete.
Click Close and Done!
Our .MSI file for Acrobat Reader is ready, we can deploy msi using GPO.

If you check the location if MSI file, you will find folders, registry file, .msi file, and .nai file.
These folders are having the files necessary for acrobat to run, and when the client machine starts the setup it use these files and registry file to place changes in registry. It’s important that you have all these files together. If you want to backup then zip the AcrobatReader9.0 folder and keep it for distribution.Hope this was helpful to you.
If you have problem and questions please mail me mohd.wasim@yahoo.com
Thanks for reading.

Regards,
Wasim.

No comments: