{"id":494,"date":"2012-09-18T00:41:04","date_gmt":"2012-09-17T22:41:04","guid":{"rendered":"http:\/\/www.samlogic.net\/blog\/?p=494"},"modified":"2019-07-08T08:40:14","modified_gmt":"2019-07-08T08:40:14","slug":"install-files-correct-folder-visual-installer","status":"publish","type":"post","link":"https:\/\/www.samlogic.net\/blog\/2012\/09\/install-files-correct-folder-visual-installer\/","title":{"rendered":"How to install files in the correct folder using Visual Installer"},"content":{"rendered":"<p><img decoding=\"async\" class=\"alignright\" src=\"https:\/\/www.samlogic.net\/blog\/images\/other\/32-bit-64-bit-symbolic.jpg\" border=\"0\" alt=\"\">As described in <a href=\"https:\/\/www.samlogic.net\/blog\/2012\/09\/how-visual-installer-handles-64-bit-folders-in-windows\/\">this blog post<\/a>, there exist two <strong>Program Files<\/strong> folders in a 64 bit computer with a 64 bit Windows. One folder is used as a storage place for 32 bit programs and the other folder is used as a storage place for 64 bit programs. And it is important that your program files are installed in the correct folder in a 64 bit system, otherwise there is a risk that your program will not function as expected.<\/p>\n<p><strong>Windows in different languages<\/strong><br \/>\nIf you create an application that may be installed in non-English versions of Windows it is important to know that the name of the <strong>Program Files<\/strong> folder may be different compared to the English version of Windows. For example in a Spanish version of Windows the name of the <strong>Program Files<\/strong> folder is <strong>Archivos de programa<\/strong>. <img decoding=\"async\" class=\"alignright\" src=\"https:\/\/www.samlogic.net\/blog\/images\/other\/flag-spanish-h70.jpg\" border=\"0\" alt=\"\"> In a Spanish 64 bit Windows, where 32 bit and 64 bit program files \/ binary files also must be placed in different folders, there will exist the following two folders on the user&#8217;s hard disk:<\/p>\n<p><strong>C:\\Arquivos de Programas<\/strong> : For 64 bit files<br \/>\n<strong>C:\\Arquivos de Programas (x86)<\/strong> : For 32 bit files<\/p>\n<p>This can be compared with the folders in an English 64 bit Windows:<\/p>\n<p><strong>C:\\Program Files<\/strong> : For 64 bit files<br \/>\n<strong>C:\\Program Files (x86)<\/strong> : For 32 bit files<\/p>\n<p>(more examples of localized folder names is available in <a href=\"https:\/\/www.samlogic.net\/articles\/program-files-folder-different-languages.htm\">this article<\/a> on our web site.)<\/p>\n<p><strong>Use an environment variable<\/strong><br \/>\nIt is impossible to handle all of the above combinations by hard-coding the folder path to the <strong>Program Files<\/strong> folder. We also advise against any tries to do so. Instead you should use an environment variable in <a href=\"https:\/\/www.samlogic.net\/visual-installer\/visual-installer.htm\">Visual Installer<\/a> that has the name <strong>%PROGRAMFILES<\/strong> to handle this. By placing this variable in the beginning of a folder path, for example like this:<\/p>\n<p><strong>%PROGRAMFILES\\SamLogic\\Visual Installer<\/strong><\/p>\n<p>the <strong>%PROGRAMFILES<\/strong> variable will be changed to correct folder path, regardless of the bitness of the program files \/ Windows and regardless of the language of the Windows. This replacement will occur during the setup process in the user\u00b4s computer.<\/p>\n<p><strong>Easier to select a variable in Visual Installer 2012<\/strong><br \/>\nIn Visual Installer 2012 (version 9.5.15 or later) it is easier to select correct variable to the main folder of the setup project. We have added a button to the right of the <strong>Main folder<\/strong> text box:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.samlogic.net\/blog\/images\/product-visual-installer\/visual-installer-main-folder.gif\" border=\"0\" alt=\"\" hspace=\"0\" vspace=\"1\"><\/p>\n<p>If you click on this button (the button with three dots) the dialog box below will be opened:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.samlogic.net\/blog\/images\/product-visual-installer\/visual-installer-dialog-box-main-folder-suggestions.gif\" border=\"0\" alt=\"\" hspace=\"0\" vspace=\"1\"><\/p>\n<p>Via this dialog box you can choose and include the <strong>%PROGRAMFILES<\/strong> variable, or another relevant variable, to the main folder of your installation project in an easy way.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As described in this blog post, there exist two Program Files folders in a 64 bit computer with a 64 bit Windows. One folder is used as a storage place for 32 bit programs and the other folder is used as a storage place for 64 bit programs. And it is important that your program &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.samlogic.net\/blog\/2012\/09\/install-files-correct-folder-visual-installer\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to install files in the correct folder using Visual Installer&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6,10,15],"tags":[],"_links":{"self":[{"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/posts\/494"}],"collection":[{"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/comments?post=494"}],"version-history":[{"count":1,"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/posts\/494\/revisions"}],"predecessor-version":[{"id":6192,"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/posts\/494\/revisions\/6192"}],"wp:attachment":[{"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/media?parent=494"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/categories?post=494"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/tags?post=494"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}