@adamedx the variable is not available outside setlocal/endlocal scope above and we may have to export again to reuse. There are multiple references outside the scope below, so may be worth having it defined. Is it ok to change other reference as well ? like https://github.com/ClogenyTechnologies/knife-windows/blob/ameya-OC-11117-azurehint/lib/chef/knife/bootstrap/windows-chef-client-msi.erb#L212