VMware Communities
scarpen
Contributor
Contributor

User Environment Variables Missing In Unity

I'm running a Windows 7 x64 VM in VMWare Fusion 3.1.2.

When I launch a command prompt from the Fusion application menu (while using Unity), the environment variables for my Windows user account are missing from the launched prompt.  The system environment variables are there, just not the ones for my user account (I have some user specific values as well as PATH additions).  When not using Unity and launching a command prompt from the Start menu, the variables are there.

Is there any way to get the user-specific variables to show up when using the application menu?  Or is there a way to launch a command prompt from the Start menu when using Unity?

Thanks.

Tags (2)
0 Kudos
9 Replies
WoodyZ
Immortal
Immortal

If you're talking about launching a Command Prompt from the menu shown below...

VMware_Fusion_Dock_Tile_Virtual_Machines_Start_Menu.png

Then I have no problem seeing a User Defined Environmental Variable in Unity View as highlighted in the image below...

Custom_Environmental_Variable_under_Unity_View.png

scarpen
Contributor
Contributor

I'm actually talking about the menu acessible via the menu bar in OSX:

VMware Fusion Start Menu.png

If I select the "Windows Command Processor" entry, I get no user environment variables.  I can define new system-wide environment variables (visible to all users) and they show up, but ones defined just for my user do not.

0 Kudos
WoodyZ
Immortal
Immortal

Okay I have opened a Command Prompt every normal way and then some and in all cases User Defined Environmental Variables in Unity View are available and sorry but I don't know of a reason why this would not be the expected behavior.

How are you setting the User Defined Environmental Variables?

BTW This on a Windows 7 Enterprise x64 SP1 Virtual Machine in VMware Fusion 3.1.2.  Are you running SP1?

Message was edited by: WoodyZ

0 Kudos
scarpen
Contributor
Contributor

The environment variables are being set via the Windows Control Panel:

Environment Variables.png

I am running SP1 (of Windows 7 Professional, not Enterprise).  It's the variables defined under "User variables for sean" that are not appearing in the opened command prompts (they have values, just blanked out in the screenshot).

If I open a command prompt from the Windows Start menu (when not running in Unity), those variable are all there.

0 Kudos
WoodyZ
Immortal
Immortal

Okay, I set mine the same way.

Well I don't have a copy of Windows 7 Professional handy at the moment to test with however I really don't think Enterprise vs Professional is a factor.

Just as a test open a Command Prompt while in Single Window view and keeping it open switch to Unity view and type SET in the Command Prompt and see if the User Defined Environmental Variables are present.

If yes then ctrl-click the Command Prompt Dock Tile in the Dock and select Options > Keep in Dock and then close the Command Prompt and then open it again from the Dock Tile.  Are the User Defined Environmental Variables present?

0 Kudos
scarpen
Contributor
Contributor

  1. Open Command Prompt in Single Window --> user variables are present
  2. Switch to Unity --> variables still present (no real surprise since the prompt is still open)
  3. Keep in Dock, close, re-open from Dock icon --> no user variables

For now I just created a batch file I can run when opening a new prompt that manually sets the variables, but I'm curious why it isn't working.

0 Kudos
WoodyZ
Immortal
Immortal

but I'm curious why it isn't working.

I am as well...

What type of account is both the Windows User and Mac OS X User?

0 Kudos
scarpen
Contributor
Contributor

So a reboot of the Windows VM fixed it.

Maybe the environment variables are cached somewhere by Fusion?  It's weird that prompts launched in Single Window (even without a reboot) picked up the settings but Unity launches did not.

0 Kudos
WoodyZ
Immortal
Immortal

So a reboot of the Windows VM fixed it.

Not surprised at all as the three finger salute is SOP under Windows for fixing issues. Smiley Happy

0 Kudos