delbert Posted February 20, 2007 Posted February 20, 2007 Hi,I am trying to come up with a simple way that i can change environment variables and then open a cmd shell in an folderand see the changed variables without re-booting the machine.I run Cmd shell in 2 different ways1. START-Run-cmdThis always opens in some Windows directory.2. In explorer, i can right click on a folder and open a Cmd shell in that directory. Microsoft have a support tool todo this, but you can do the same with the following registry entries.[HKEY_LOCAL_MACHINE\Software\Classes\Folder\Shell][HKEY_LOCAL_MACHINE\Software\Classes\Folder\Shell\AcraFlow: Open Cmd Shell][HKEY_LOCAL_MACHINE\Software\Classes\Folder\Shell\AcraFlow: Open Cmd Shell\command]@="cmd.exe /k pushd %L"I have found 2 useful utilites for setting environment variables, setx.exe and setenv.exe.What i have done so far is 1. created a .bat file to set the environment variable to what i want. I double click on the file to set the variable.setenv -u MYVARIABLE myvalue2. If i open a command shell as follows, and run the set command, i see the variable MYVARIABLE START-Run-cmd3. However, if i open a command shell using a right click on a folder in Explorer, and run the set command, i dont see the variable.Why is this? Its very frustrating.Any help would be really appreciated.ThanksDelbert.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now