%HOME% was different depending on whether I logged into Windows while on my Active Directory managed network or while I was offline. When on the AD network, %HOME% is set by policy to a mapped drive. When offline, %HOME% is my Windows %USERPROFILE%. I installed Vagrant and some base boxes while off my AD network and everything worked as expected. Base boxes were added to %USERPROFILE%/.vagrant.d/. Back in the office and logged in on the AD network, Vagrant was no longer aware of the base boxes because %HOME% now pointed at my personal mapped drive.
Creating a batch file to set %HOME% to %USERPROFILE% solved the problem.
REM %USERPROFILE%/cmdrc.bat
@echo off
set HOME=%USERPROFILE%
For UNIXy goodness, name it cmdrc.bat, place it in %USERPROFILE% and then add the following to the registry so that this cmdrc.bat file is run whenever a command prompt opens.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"AutoRun"="%USERPROFILE%\\cmdrc.bat"
--
Figured this out with help from the MinGW wiki's HOWTO Set the HOME variable for cmd exe.
No comments:
Post a Comment