{"id":6935,"date":"2014-04-07T05:00:00","date_gmt":"2014-04-07T13:00:00","guid":{"rendered":"http:\/\/www.sapien.com\/blog\/?p=6935"},"modified":"2014-04-25T08:04:01","modified_gmt":"2014-04-25T16:04:01","slug":"from-script-to-server-deploying-solutions-with-primalscript-2014-part-2","status":"publish","type":"post","link":"https:\/\/dev.sapien.com\/blog\/2014\/04\/07\/from-script-to-server-deploying-solutions-with-primalscript-2014-part-2\/","title":{"rendered":"From script to server &ndash; Deploying solutions with PrimalScript 2014 (Part 2)"},"content":{"rendered":"<p>Last time we looked at the new packager options in PrimalScript 2014. You can find the article here: <a href=\"http:\/\/www.sapien.com\/blog\/2014\/03\/25\/from-script-to-server-deploying-solutions-with-primalscript-2014-part-1\/\">http:\/\/www.sapien.com\/blog\/2014\/03\/25\/from-script-to-server-deploying-solutions-with-primalscript-2014-part-1<\/a><\/p>\n<p>If you look at the deploy tab again, you see an installer group that was not an option in any of the previous PrimalScript versions<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"image\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2014\/03\/image3.png\" alt=\"image\" width=\"450\" height=\"142\" border=\"0\" \/><\/p>\n<p>This new feature allows you to wrap your scripts, packaged executables, associated scripts, modules, configuration and binary files in a proper Microsoft Windows Installer database for easier deployment. If you have participated in our MSIWizard community preview you may already be familiar with a lot of this. Let\u2019s examine the options we have.<\/p>\n<p><a href=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2014\/03\/SNAGHTML498d292.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"SNAGHTML498d292\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2014\/03\/SNAGHTML498d292_thumb.png\" alt=\"SNAGHTML498d292\" width=\"640\" height=\"402\" border=\"0\" \/><\/a><\/p>\n<p>Most of the settings on this dialog are pretty straightforward, but lets go through them anyway:<\/p>\n<p><strong>Product Name:<\/strong> That is what will show up in the control panel \u201cPrograms and Features\u201d list. So it\u2019s important that you pick a name your users will recognize.<\/p>\n<p><strong>Product Version:<\/strong> Each installer needs to have a version number. That allows the update feature to work properly. It prevents older copies from installing over a new version, it prevents re-installing an already installed version and it will trigger an uninstall\/install if a previous version is installed. To make keeping track of this number easier we added a feature where the version number for the installer gets extracted from an executable file. Most commonly that will be the file you created with the packager, but it can be any executable file with a version resource. But of course you can still enter your version numbers manually if you like.<\/p>\n<p><strong>Company Name:<\/strong> That name is visible in the \u201cPrograms and Features\u201d applet as well. It also determine the folder name if you application gets installed under the Program Files folder.<\/p>\n<p><strong>Product Type:<\/strong> Your selection here, together with the \u201c64 Bit installer\u201d and \u201cInstall for all users\u201d options determines where your files are installed.<\/p>\n<p>The following table shows the locations for a 64 bit OS with \u201c<em>Install for all users<\/em>\u201d selected<\/p>\n<table border=\"1\" width=\"643\" cellspacing=\"0\" cellpadding=\"2\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"150\">\n<p align=\"center\"><strong>Product Type<\/strong><\/p>\n<\/td>\n<td valign=\"top\" width=\"248\">\n<p align=\"center\"><strong>32 bit<\/strong><\/p>\n<\/td>\n<td valign=\"top\" width=\"243\">\n<p align=\"center\"><strong>64 bit<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"150\">Windows Application<\/td>\n<td valign=\"top\" width=\"248\">C:\\Program Files (x86)\\<em>Product Name<\/em><\/td>\n<td valign=\"top\" width=\"243\">C:\\Program Files\\<em>Product Name<\/em><\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"150\">Script Application<\/td>\n<td valign=\"top\" width=\"248\">C:\\Program Files (x86)\\<em>Product Name<\/em><\/td>\n<td valign=\"top\" width=\"243\">C:\\Program Files\\<em>Product Name<\/em><\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"150\">PowerShell Module<\/td>\n<td valign=\"top\" width=\"248\">%Windir%\\SysWOW64\\WindowsPowerShell\\v1.0\\Modules\\<em>Product Name<\/em><\/td>\n<td valign=\"top\" width=\"243\">%Windir%\\System32\\WindowsPowerShell\\v1.0\\Modules\\<em>Product Name<\/em><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>This table shows the locations for a 64 bit OS with a current user <strong>only<\/strong> install selected<\/p>\n<table border=\"1\" width=\"644\" cellspacing=\"0\" cellpadding=\"2\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"150\">\n<p align=\"center\"><strong>Product Type<\/strong><\/p>\n<\/td>\n<td valign=\"top\" width=\"249\">\n<p align=\"center\"><strong>32 bit<\/strong><\/p>\n<\/td>\n<td valign=\"top\" width=\"243\">\n<p align=\"center\"><strong>64 bit<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"150\">Windows Application<\/td>\n<td valign=\"top\" width=\"249\">C:\\Program Files (x86)\\<em>Product Name<\/em><\/td>\n<td valign=\"top\" width=\"243\">C:\\Program Files\\<em>Product Name<\/em><\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"150\">Script Application<\/td>\n<td valign=\"top\" width=\"249\">%HomePath%\\Script Applications\\<em>Product Name<\/em><\/td>\n<td valign=\"top\" width=\"243\">%HomePath%\\Script Applications\\<em>Product Name<\/em><\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"150\">PowerShell Module<\/td>\n<td valign=\"top\" width=\"249\">%HomePath%\\WindowsPowerShell\\Modules\\<em>Product Name<\/em><\/td>\n<td valign=\"top\" width=\"243\">%HomePath%\\WindowsPowerShell\\Modules\\<em>Product Name<\/em><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>The folders for a 32 bit OS are the same to those shown here, except that \u201cProgram Files (x86)\u201d is always \u201cProgram Files\u201d and \u201cSysWOW64\u201d is always \u201cSystem32\u201d.<\/p>\n<p>&nbsp;<\/p>\n<p><em><strong>Product Icon<\/strong><\/em>: This icon file will be embedded in the MSI file and shown in \u201c<em>Programs and Features<\/em>\u201d with your product.<\/p>\n<p><strong>64-Bit installer<\/strong>: Checking this option prevents installation on 32 bit OS. It also registers COM components as 64 bit components and changes some folder names as indicated earlier.<\/p>\n<p><strong>Install for all users<\/strong>: This will install the application and its shortcuts for all users on a system. In most cases this option will require administrative privileges. It also affects the install folder location for some product types.<\/p>\n<p><strong>Require Administrator<\/strong>: Checking this option will cause Windows Installer to prompt for elevation on Windows Vista or higher. The type of prompt depends on your local UAC (User Access Control) settings and the currently logged on user.<\/p>\n<p><strong>Require PowerShell V3<\/strong>:\u00a0 With this option checked, the installer checks if PowerShell V3 is installed. If it is not, a prompt to install WinRM 3.0 is displayed and the installation is aborted.<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2014\/03\/SNAGHTML4afb67b.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"SNAGHTML4afb67b\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2014\/03\/SNAGHTML4afb67b_thumb.png\" alt=\"SNAGHTML4afb67b\" width=\"640\" height=\"402\" border=\"0\" \/><\/a><\/p>\n<p>This page of the MSI settings allows you specify which files go into your installer. To make this easier, you can just drag and drop them from Windows Explorer onto this list. The little blue arrows allow you to arrange the files in any order you like, but note that this has no actual impact on the installation.<\/p>\n<p><strong>Create Shortcut to<\/strong>: Select the file you want to create a shortcut to in the Windows Start menu. At this time you can only select one file. Typically this is your main executable or script file. For PowerShell modules you can link to the help file for example.<\/p>\n<p><strong>MSI Name<\/strong>: The filename for your MSI. This only affects the actual MSI file and not any of the internal names.<\/p>\n<p><strong>Output Folder<\/strong>: This specifies the location where you want the MSI file to be created. It can be any existing folder. If you choose a network location, please make sure this location is available when building your installer.<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2014\/03\/SNAGHTML4b4b043.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"SNAGHTML4b4b043\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2014\/03\/SNAGHTML4b4b043_thumb.png\" alt=\"SNAGHTML4b4b043\" width=\"640\" height=\"402\" border=\"0\" \/><\/a><\/p>\n<p>Last but not least, you have the option to apply a digital signature to your installer.<\/p>\n<p><strong>Certificate<\/strong>: A certificate is either a code signing certificate installed in your local store or a PFX file you specify in this field. You can browse for a PFX file using the file browse button(<a href=\"file:\/\/\/C:\/Users\/Alex\/AppData\/Local\/Temp\/WindowsLiveWriter1286139640\/supfiles4AC80EA\/image41.png\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"image_thumb1\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2014\/03\/image_thumb1.png\" alt=\"image_thumb1\" width=\"31\" height=\"28\" border=\"0\" \/><\/a> ) or a certificate using the certificate button (<a href=\"file:\/\/\/C:\/Users\/Alex\/AppData\/Local\/Temp\/WindowsLiveWriter1286139640\/supfiles4AC80EA\/image8.png\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"image_thumb3\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2014\/03\/image_thumb3.png\" alt=\"image_thumb3\" width=\"28\" height=\"27\" border=\"0\" \/><\/a> )<\/p>\n<p><strong>Password<\/strong>: If you specified a PFX file for code signing it may require the use of a password. If so, please enter it here.<\/p>\n<p><strong>Timestamp URL<\/strong>: This URL is used to create a time stamp for the signature used to sign the file. Logging the time of signing allows your MSI file\u2019s signature to remain valid even after the certificate expired.<\/p>\n<p><strong>Use the Signing Wizard to sign the MSI file<\/strong>: If your certificate does not fit the above criteria or if you need to sign with a different signature each time you are building a MSI you can use the Microsoft Signing Wizard. Any settings entered above will be ignored and the wizard will guide you through the signing process.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; border-width: 0px;\" title=\"image\" src=\"http:\/\/www.sapien.com\/blog\/wp-content\/uploads\/2014\/03\/image4.png\" alt=\"image\" width=\"131\" height=\"93\" border=\"0\" \/><\/p>\n<p>The buttons here let you easily build and test your installer. Build, install and uninstall from here until you have it all ready to go. Next time we will look at the Deployment options which will help you distribute your solution to others.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last time we looked at the new packager options in PrimalScript 2014. You can find the article here: http:\/\/www.sapien.com\/blog\/2014\/03\/25\/from-script-to-server-deploying-solutions-with-primalscript-2014-part-1 If you look at the deploy tab again, you see an installer group that was not an option in any of the previous PrimalScript versions This new feature allows you to wrap your scripts, packaged executables, [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[410,21,632,25],"tags":[880,881,548,437,28,800],"class_list":["post-6935","post","type-post","status-publish","format-standard","hentry","category-primalscript-software-news","category-software-news","category-whats-new-software-news","category-windows-powershell","tag-deploy","tag-executable","tag-msi","tag-packager","tag-powershell","tag-primalscript-2014"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/6935","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/comments?post=6935"}],"version-history":[{"count":5,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/6935\/revisions"}],"predecessor-version":[{"id":6968,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/6935\/revisions\/6968"}],"wp:attachment":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/media?parent=6935"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/categories?post=6935"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/tags?post=6935"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}