{"id":3641,"date":"2015-11-03T22:59:43","date_gmt":"2015-11-03T21:59:43","guid":{"rendered":"http:\/\/www.samlogic.net\/blog\/?p=3641"},"modified":"2020-11-12T23:34:54","modified_gmt":"2020-11-12T23:34:54","slug":"using-environment-variables-in-visual-installer","status":"publish","type":"post","link":"https:\/\/www.samlogic.net\/blog\/2015\/11\/using-environment-variables-in-visual-installer\/","title":{"rendered":"Using environment variables in Visual Installer"},"content":{"rendered":"<p>It is possible to use Windows environment variables in Visual Installer. The environment variables can be used in the <strong>Registry<\/strong> tab and in the <strong>INI files<\/strong> tab in Visual Installer. You can find a list of supported environment variables in this <a href=\"https:\/\/en.wikipedia.org\/wiki\/Environment_variable\" target=\"_blank\" rel=\"noopener noreferrer\">Wikipedia page<\/a> (see the <strong>Windows<\/strong> section).<\/p>\n<p>You use an environment variable in the same way as a Visual Installer variable. For example, to include the <strong>%ProgramFiles%<\/strong> environment variable in a file path you can include it like this:<\/p>\n<p><strong>%ProgramFiles%\\SamLogic\\Visual Installer<\/strong><\/p>\n<p>And during the installation the <strong>%ProgramFiles%<\/strong> variable will be replaced with the current value that the system returns (usually <strong>C:\\Program Files (x86)<\/strong>).<\/p>\n<p>The picture below shows how to use the <strong>%COMPUTERNAME%<\/strong> environment variable in the <strong>Registry<\/strong> tab in Visual Installer:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.samlogic.net\/blog\/images\/product-visual-installer\/vi2015-editor-registry-tab-environment-variable.png\" border=\"0\" alt=\"\"><\/p>\n<p>During the installation the <strong>%COMPUTERNAME%<\/strong> variable will be replaced with the current computer name of the computer.<\/p>\n<p><strong>See also<\/strong><br \/>\n<strong><span style=\"color: #ff0000;\">&gt;<\/span><\/strong> <a href=\"https:\/\/www.samlogic.net\/blog\/2016\/01\/with-the-setenv-command-you-can-set-environment-variables-from-visual-installer\/\">With the SETENV command you can set environment variables from Visual Installer<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>It is possible to use Windows environment variables in Visual Installer. The environment variables can be used in the Registry tab and in the INI files tab in Visual Installer. You can find a list of supported environment variables in this Wikipedia page (see the Windows section). You use an environment variable in the same &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.samlogic.net\/blog\/2015\/11\/using-environment-variables-in-visual-installer\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Using environment variables in 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":[10,15],"tags":[],"_links":{"self":[{"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/posts\/3641"}],"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=3641"}],"version-history":[{"count":3,"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/posts\/3641\/revisions"}],"predecessor-version":[{"id":6498,"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/posts\/3641\/revisions\/6498"}],"wp:attachment":[{"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/media?parent=3641"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/categories?post=3641"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.samlogic.net\/blog\/wp-json\/wp\/v2\/tags?post=3641"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}