Setting Working folder to all repository

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
ljj

Setting Working folder to all repository

Post by ljj » Fri Aug 06, 2004 6:49 am

Hello,

I'm curently i the process of developing a Installation package for my company, så that we easly can distrubute the Vault Client to our workstations.

I would like to set the working folder for all repositorys to d:\vaultwork

Is there a way to do this??

Kind regards

Lars Lilja Jensen
AVEDOERE POWER PLANT
ENERGI E2
Denmark
mail: ljj@E2.dk

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Fri Aug 06, 2004 7:49 am

The GUI client doesn't accept commands from scripts or programs, but the command line client (vault.exe) does have a command called SETWORKINGFOLDERS that allows you to do this.

One other thing to note is that your Vault server does contain the installer for the client, downloadable from the server itself. If your vault server is installed on "machine", go to http://machine/VaultService, and there will be a link there to the client installer. That may or may not help you for what you are doing, but I thought I would mention it.

sterwill
Posts: 256
Joined: Thu Nov 06, 2003 10:01 am
Location: SourceGear

Post by sterwill » Fri Aug 06, 2004 7:57 am

There is a way, but it's not as easy as it could be. Vault stores the working folder mappings on the client machine, in a directory specific to the Windows user, the Vault user, and the Vault repository. An example location for this file would be:

Code: Select all

C:\Documents and Settings\sterwill.SOURCEGEAR\Application Data\SourceGear\Vault_1\Client\15A798C9-F093-41A6-8E73-EED7486434CD\sterwill\CacheMember_WorkingFolderAssignments
If you log in on one computer, and set your working folder for the root folder, then close Vault, you will have a CacheMember_WorkingFolderAssignments file you can distribute to the client machines. The big GUID above is the unique repository ID, which will be the same on your client machine as on all the other client machines that use that repository. You can use the special Windows variable %APPDATA% to find the path up to the Application Data part.

So if you know the Vault username for each client machine, you could write a script to copy your CacheMember_WorkingFolderAssignments file to this path (creating it before):

Code: Select all

%APPDATA%\SourceGear\Vault_1\Client\<RepositoryID>\<VaultUserName>\
Shaw Terwilliger
SourceGear LLC
`echo sterwill5sourcegear6com | tr 56 @.`

Guest

Post by Guest » Fri Aug 06, 2004 8:06 am

Is the setting user dependent or machine dependent?

/Lars

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Fri Aug 06, 2004 8:09 am

Working folders are machine dependent - one user can have different working folders on different machines.

Guest

Post by Guest » Tue Aug 10, 2004 1:25 am

Hmm...

The thing is that we would like the Vault Client to always use d:\vaultwork regardless of user logged in to the system.

We would also like to locked the setting so that the user cannot change the setting.

Is this possible?

Kind Regards

Lars Lilja Jensen

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Tue Aug 10, 2004 8:02 am

There currently isn't a way to lock the working folder setting, so that users can't change it.

You can use Shaw's method, or the command line to try to set all the working folders to the same place by default.

Lilja

Post by Lilja » Thu Aug 12, 2004 3:20 am

It is not a very good option to do a script for all the users, what if you make a new user you have the same problem.

The reason why we want do define the work dir, is that we are using roaming profiles on our lan, when the Vault is saving data c:\documents and settings, then the profile fills up very quickly, and that is a great problem for us.

Is there a way to use another path to the user files other than c:\documents and settings???

Kind regards

Lars Lilja Jensen

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Thu Aug 12, 2004 6:59 am

I don't believe setting working folders is what you are looking for. You should take a look at the general option -> storing working folder data within working folders.

See item 1) in this KB article: Understanding the Vault Client.

Additionally, there is a way to set this option for all users by looking at the sgvault.dbo.tblclientoptions see the option named "StoreDataInWorkingFolders". When the value = "False", state information is stored in the user's profile. When the value = "True", state information is stored in the working folder assigned to the repository path.

But beware, making a global change will cause user's to have problems unless they do a full "Get Latest Version" after the change. See the last paragraph of item 1) in the KB article I mentioned above.

HTH
Jeff Clausius
SourceGear

davidt
Posts: 44
Joined: Thu Aug 12, 2004 7:43 am

Post by davidt » Thu Aug 12, 2004 7:48 am

For what it's worth, Microsoft's programming guidelines suggest that per-user data that should -not- be copied as part of a roaming profile be stored in:

C:\Documents and Settings\<user>\Local Settings\Application Data\...

rather than

C:\Documents and Settings\<user>\Application Data\...

This might be another way to keep Vault state information from being copied all over the network.

David

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Fri Aug 13, 2004 8:12 am

davidt wrote:For what it's worth, Microsoft's programming guidelines suggest that per-user data that should -not- be copied as part of a roaming profile be stored in:

C:\Documents and Settings\<user>\Local Settings\Application Data\...

rather than

C:\Documents and Settings\<user>\Application Data\...

This might be another way to keep Vault state information from being copied all over the network.

David
Thanks for the suggestion, David. We've added this to the bug DB.

Post Reply