Creating a Package using an MSI
Full-Access Members Only
Sorry, this lesson is only available to Server Academy Full-Access members. Become a Full-Access member now and get instant access to this and many more premium courses. Click the button below and get instant access now.
Instructions
Q&A (0)
Notes (0)
Resources (0)
Saving Progress...
Resources
There are no resources for this lesson.
Notes can be saved and accessed anywhere in the course. They also double as bookmarks so you can quickly review important lesson material.
In this lecture we will create a package using XmlNotepad,
First we will need to find and test our Install and uninstall Commands.
Because the program is an .msi we will use msiexec for the install command.
- And here is the Install Command - MsiExec.exe /I XmlNotepad.msi /qn
/I for install and /qn for quiet install. I found the install command on this website. Let’s go out and check it out.
- For the install command, I just had to change XmlNotepadSetup.msi to XmlNotepad.msi to match my installer.
For the uninstall command
- You will need to have the product installed to find the uninstall command.
- For the uninstall string it looks like the author is using the product code. So I will have to use regedit to locate an updated product code that will work with my version of the program.
There are two places in the registry I can check for the uninstall string for my program.
Considering this is a 32 bit application running on a 64 bit O/S I will check in the WOW6432 for the uninstall string.
I’ll go ahead and open regedit now and browse through \HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{FC7BACF0-1FFA-4605-B3B4-A66AB382752D}
And there is a whole list of product codes. I had to click through each of these until I found the correct Uninstall String. So here is our uninstall command. From the website mentioned above I added the following parameters /x (for uninstall and qn for quiet or silent uninstall
- Uninstall Command - MsiExec.exe /x {FC7BACF0-1FFA-4605-B3B4-A66AB382752D} /qn
- Now copy both of these commands to Notepad.
You should test your install and uninstall command lines from an admin level command prompt before you deploy them out to your infrastructure.
Let’s go ahead and open an Admin level command prompt and test our command lines.
- Change to the source folder where the program resides.
- Now copy and paste the install command - MsiExec.exe /I XmlNotepad.msi /qn Press return 3:21
- After a minute if you click start and check the program you will see XML notepad 2007
- Now let’s check the uninstall command.
Paste the uninstall command into your command prompt. MsiExec.exe /x {FC7BACF0-1FFA-4605-B3B4-A66AB382752D} /qn. And press return 3:46
- After a minute if you click start and check the programs you will see XML notepad 2007 is no longer there
Now let’s go ahead and create our package
- From the Software Library, Application Management, right click Packages, then click create package.
- From Package, Name, type XmlNotepad
- Check t his package contains source files, then click browse
- Then enter the UNC path for the XmlNotepad.msi program, then click browse, then click select folder, then click ok, then click next.
- From Program Type, choose Standard Program, then click next
From Standard Program, Name type XmlNotepad-Install
- From Command Line, paste the install command - MsiExec.exe /I XmlNotepad.msi /qn
- From Run select Hidden
- From Program can run – Whether or not user is logged on, then click next
- From Requirements Platform requirements – You could choose to run on Windows 10 only, but in this case we will choose This program can run on any platform.
- Estimated disk space – 10 MB
- Maximum runtime – 15 minutes, click next, then click next again
- Click close
Now right click on the XmlNotepad package and click distribute content, then click next
Server Academy Members Only
Sorry, this lesson is only available to Server Academy Full Access members. Become a Full-Access Member now and you’ll get instant access to all of our courses.