{"id":1253,"date":"2017-12-04T06:00:38","date_gmt":"2017-12-04T06:00:38","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=1253"},"modified":"2020-01-09T09:35:50","modified_gmt":"2020-01-09T09:35:50","slug":"install-external-program-from-cdrom-drive","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/install-external-program-from-cdrom-drive\/","title":{"rendered":"Install external program from CDROM drive"},"content":{"rendered":"<p><strong>InstallerGeek created the topic: Install external program from CDROM drive<\/strong><br \/>\nI searched all over the Wix but couldn&#8217;t find anywhere how to install application from cdrom drive.<\/p>\n<p>I have wix install which should install SQL Server 2008 based on user selection. Say, if user selects client install I don&#8217;t have to install SQL Server but if he selects Server install then I have to install it and SQL Server folder is on the CD.<\/p>\n<p>CD ROM Directory structure looks like this CD\\Setup.exe &#8211; Wix Installer with BootStrapper to Install .NET Framework.<\/p>\n<p>CD\\SQLSERVER2008 &#8211; this folder includes x86 and x64 installer for SQL Server 2008 Express Edition.<\/p>\n<p>I need one to install SQL Server from the CD Folder.<\/p>\n<p>Something like<br \/>\n<var.Platform = x64><br \/>\n<CustomAction Id=\"InstallSQLx64\"\n                FileKey=\"[cddromdir]\\SQLServer2008\\SQLEXPR_x64_ENU.EXE\"\n                ExeCommand =\"\/q \/hideconsole \/action=Install \/features=SQL \/INSTANCENAME=MSSQLSERVER \/TCPENABLED=1 \/SECURITYMODE=SQL \/SAPWD=\"****\"  \/enableranu=1 \/sqlsvcaccount= \"NT Authority\\System\" \/SQLSYSADMINACCOUNTS=\"BUILTIN\\ADMINISTRATORS\"  \/skiprules=RebootRequiredCheck\"\n\n<var.Platform = x86><br \/>\n<CustomAction Id=\"InstallSQLx86\"\n                FileKey=\"[cddromdir]\\SQLServer2008\\SQLEXPR32_x86_ENU.EXE\"\n                ExeCommand =\"\/q \/hideconsole \/action=Install \/features=SQL \/INSTANCENAME=MSSQLSERVER \/TCPENABLED=1 \/SECURITYMODE=SQL \/SAPWD=\"****\"  \/enableranu=1 \/sqlsvcaccount= \"NT Authority\\System\" \/SQLSYSADMINACCOUNTS=\"BUILTIN\\ADMINISTRATORS\"  \/skiprules=RebootRequiredCheck\"\n\nIs this possible?\n\n\n<strong>applicationPackaging replied the topic: Re: Install external program from CDROM drive<\/strong><br \/>\nYou can&#8217;t generally launch one install program from within another.<br \/>\nHowever, I am not familiar with the specifics of this scenario, so, maybe?<\/p>\n<p><strong>InstallerGeek replied the topic: Re: Install external program from CDROM drive<\/strong><br \/>\nIn InstallShield, its very simple I can literally launch any program using LaunchAppAndWait(SOURCEFOLDER\\SQLServer2008\\setup.exe) but here I can&#8217;t find any tutorials or sample or even a code snippet to say you can do that.<\/p>\n<p><strong>applicationPackaging replied the topic: Re: Install external program from CDROM drive<\/strong><br \/>\nDon&#8217;t take what I said the wrong way. WiX is just an MSI authoring tool, and as such has many of the same or comparable capabilities that InstallShield does (I&#8217;ve used both and much prefer WiX). It&#8217;s just that launching one installer from within another is not something Microsoft supports or allows with the current MSI technology (InstallSheild or WiX). However, if your Setup.exe doesn&#8217;t ultimately run an MSI, then maybe.<\/p>\n<p>Snag a verbose log file and see what is says. We use a Setup.exe that launches our installer with logging, as a verbose log file is critical for debugging many issues.<\/p>\n<p>Good luck with your project.<\/p>\n<p><strong>InstallerGeek replied the topic: Re: Install external program from CDROM drive<\/strong><br \/>\nThanks, I will try that.<\/p>\n<p>I was thinking of using a CustomAction to run the external program, which I already do for creating a database from the installed folder, but all I wanted is access CDROM drive (Source Drive) to execute a CustomAction. I thought that can be done?<\/p>\n<p><strong>applicationPackaging replied the topic: Re: Install external program from CDROM drive<\/strong><br \/>\nI do have a CustomAction that references the SourceDir for its data files, but unlike yours the main executable that I run is on the Hard Disk. Still, a working example might be of some use so I have pasted it below.<\/p>\n<p><CustomAction Id=\"LoansMenuImport\" Property=\"LoansMenuImport\"\nValue=\"\"[FLOWMANDIR]MenuDesigner\\MenuImport.exe\" FlowMan FL0Wm@n \"[SourceDir]E3Menus\\E3Menu.xml\" \/R \/O \/L\"\nHideTarget=\"yes\" \/><\/p>\n<p><strong>applicationPackaging replied the topic: Re: Install external program from CDROM drive<\/strong><br \/>\nYou need CA Type 34 ( blogs.technet.com\/alexshev\/archive\/2008\/&#8230;-custom-actions.aspx ) and use [SourceDir] (instead of [cdromdir]).<br \/>\nStill, bootstrapper is probably a better choice to install SQL prerequisite.<\/p>\n<p><strong>applicationPackaging replied the topic: Re: Install external program from CDROM drive<\/strong><br \/>\nAnd, maybe I should point out that you might actually need two CustomAction entries to run one program. Here&#8217;s mine<\/p>\n<p><CustomAction Id=\"LoansMenuImport\" Property=\"LoansMenuImport\"\nValue=\"\"[FLOWMANDIR]MenuDesigner\\MenuImport.exe\" FlowMan FL0Wm@n \"[SourceDir]E3Menus\\E3Menu.xml\" \/R \/O \/L\"\nHideTarget=\"yes\" \/><\/p>\n<p><CustomAction Id=\"caLoansMenuImportexe\" Return=\"check\"\nExeCommand=\"[LoansMenuImport]\" Directory=\"TARGETDIR\" HideTarget=\"yes\" \/><\/p>\n<p>The first one sets up the command line to use.<\/p>\n<p>The second one is what actually gets run. Notice how ExeCommand points back to the Property defined in the first one.<\/p>\n<p><strong>InstallerGeek replied the topic: Re: Install external program from CDROM drive<\/strong><br \/>\nSo my code would be something like this<\/p>\n<p>    <CustomAction Id=\"CAExecuteSQL\" Property=\"LoadSQLExecute\" Value =\"[SourceDir]\\SQLServer2008\\SQLEXPR32_x86_ENU.EXE \/q \/hideconsole  \/action=Install\n        \/features=SQL \/INSTANCENAME=MSSQLSERVER \/TCPENABLED=1 \/SECURITYMODE=SQL\n        \/SAPWD=\"****\"  \/enableranu=1 \/sqlsvcaccount= \"NT Authority\\System\"\n        \/SQLSYSADMINACCOUNTS=\"BUILTIN\\ADMINISTRATORS\"\n        \/skiprules=RebootRequiredCheck\"\n                                  Execute=\"immediate\"\n                                  Impersonate=\"no\"\n                                  Return=\"asyncWait\"\n                                  HideTarget=\"yes\"\/><\/p>\n<p><CustomAction Id=\"ExecuteSQL\" Return=\"check\" ExeCommand=\"CAExecuteSQL\" Directory=\"SourceDir\" HideTarget=\"yes\" \/><\/p>\n<p>Does the Directory=&#8221;SourceDir&#8221; exists?<\/p>\n<p><strong>InstallerGeek replied the topic: Re: Install external program from CDROM drive<\/strong><br \/>\nCA Type 34 &#8211; does it give me the D:\\ drive (CD ROM Drive). If it does then half problem is solved.<\/p>\n<p>Yes, I wish bootstrapper &#8211; I do have it but got to remove it, well requirements are that we need to install items on demand based on user selection.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>InstallerGeek created the topic: Install external program from CDROM drive I searched all over the Wix but couldn&#8217;t find anywhere how to install application from cdrom drive. I have wix&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[49],"tags":[305],"class_list":["post-1253","post","type-post","status-publish","format-standard","hentry","category-general","tag-cdrom"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/1253","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=1253"}],"version-history":[{"count":1,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/1253\/revisions"}],"predecessor-version":[{"id":1254,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/1253\/revisions\/1254"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=1253"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=1253"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=1253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}