Where is the .cascm\WorkSpace folder in Windows 7? It seems to be in the wrong place.
search cancel

Where is the .cascm\WorkSpace folder in Windows 7? It seems to be in the wrong place.


Article ID: 49903


Updated On:


CA Harvest Software Change Manager - OpenMake Meister


Where in the config does it set where the workspace should be? We are seeing on a few machines that no matter what if you login as it tries to create or reference C:\Users\<Your Userid>\.cascm. Under previous versions of Windows it went under C:\Documents and Settings\<Your Userid>\.cascm.



CA Harvest Software Change Manager 12.x and higher


IMPORTANT: This article contains information about modifying the registry.

Before you modify the registry, make sure to create a back up of the registry and ensure that you understand how to restore the registry if a problem may occur.

For more information about how to back up, restore, and edit the registry, please review the relevant Microsoft Knowledge Base articles on support.microsoft.com.

How a user's Workspace location is determined
The CA SCM Workbench is an Eclipse-based Java application. It uses the Eclipse runtime options which you can learn about here:

The Workspace for the Workbench will exist in the folder ".cascm" at the location defined in the file:

The relevant entry in config.ini is:
[email protected]/.cascm/workspace

"@user.home" is an Eclipse Location property which in all cases is replaced with the value of the Java "user.home" System property at runtime.

There is a known BUG in the Microsoft Java JVM which can affect the value of the Java System property "user.home". It is documented here: http://bugs.sun.com/view_bug.do?bug_id=4787931

In all supported versions of Windows, the Java runtime evaluates the Registry Key:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Desktop

to build the value of the Java System property "user.home". It accomplishes this by stripping off the last directory of this value (since it is presumed to point to the location of the current user's desktop folder).

An example Desktop key value is: C:\Users\<Your Userid>\Desktop

The JVM strips "Desktop" from this path and sets the value of "user.home" to the result:
C:\Users\<Your Userid>

The Eclipse-based CA SCM Workbench in turn uses the value of Java's "user.home" to set the value of "@User.home" to the location of the SCM Workspace as specified in the config.ini entry:

[email protected]/.cascm/workspace

In our example, then, the CA SCM Workbench will use the location

C:\Users\<Your Userid>\.cascm\workspace

as the location of the CA SCM Workspace for the current user.

You can test this behavior yourself by editing the Registry Key

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Desktop

to point to a different location. Whatever you put in this key will have its last directory stripped off and ".cascm\workspace" will be appended to construct your new Workspace location.

Why is this a problem?
In some cases, especially if Windows 7 was an upgrade from Windows XP, The registry key may not contain a hard-coded path, but may say "%USERPROFILE%\desktop", and in cases where a default profile or a roaming profile are used, this variable will either be set incorrectly or not set at all for the currently logged in user. There are also known cases where the value of %USERPROFILE% can change during a Windows session, making it a highly unreliable source of information about where the current user's actual home directory is.

How can you workaround this?

Method 1: Modify config.ini
On each Windows box where the CA SCM Client or Workbench-only is installed, go to %CA_SCM_HOME%\configuration

Edit config.ini with Notepad and make these changes:

Comment out the following line and replace it with the correct location.

#[email protected]/.cascm/configuration

Comment out the entry for "osgi.instance.area.DEFAULT" and replace it with a corrected entry called "osgi.instance.area".

#[email protected]/.cascm/workspace

Save config.ini and start the Workbench. You should now see the .cascm folder created in the location you have specified.

Pay particular attention to a few things when editing config.ini.

  • You must use the Java forward slash "/" and NOT the Windows backwards slash "\".

  • You must replace the entry for "osgi.instance.area.default" entirely with a new entry called "osgi.instance.area". If you don't do this, whatever value is in your Registry Key will override the "default" setting in your config.ini.

  • If you make a mistake in your config.ini, either the location specified in your Registry will be used instead of your entry, or, if the Registry Key location is also invalid, no location will be used at all and you will end up without a saved Workspace.

  • Since the config.ini file is in a location shared by all users of the machine, if you need to modify it for multiple users on one PC, your users will either have to remember to use their own version of config.ini, or you may opt for Method #2 - Modify the Windows Registry.

Method 2: Modify the Windows Registry
While logged is as the user whose Workspace location you wish to change (note that this user must have administrative privileges in order to modify the registry, if only temporarily)

start Regedit from a command prompt or the Run box in the Windows start menu

Navigate to: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders

Change the value of the "Desktop" key to the desired location of the Workspace for that user.

Exit Regedit.

The change will be effective immediately.

Repeat this process for each user on this machine to set the location of their own private Workspace.