I was planning to discuss the Force_Dir initialization variable today but requests from the blogosphere take precedence. :-)  Mark Hurley poses the oft asked question: "I've been wanting to know for a while how to default the login window with my name. Even better, how about bypassing the login screen on startup?"

You can auto-populate the VSS login dialog box with your network username, a non network VSS username, and you can avoid prompts for username and password entirely when opening VSS Explorer, VSS Admin, or when executing commands from a command prompt or script. Here's how:

First, you can add the Use_Network_Name = Yes variable to your SRCSAFE.ini file, which contains database-wide, user-agnostic settings. After setting this variable, when a database user opens VSS, the Login dialog box appears with their network user name in place. You can also open the VSS Admin exe, click Tools, click Options, and then select Use network name for automatic user log in. (But that's just not as glamorous as hacking away at an ini file, now is it? :D)  If you apply this setting, team members should be FORBIDDEN to use the same password in VSS as they do for their network account since anyone with administrative access to the VSS database can obtain it. To avoid prompts entirely...

When working on the command line or writing a batch file, you can temporarily disable prompts by typing “SET SSUSER=<username>” and “SET SSPWD=<password>”. These variables are retained until the user session ends, typically when you close the Command window.

Finally, to permanently suppress login prompts (in Windows)

1.      On your desktop, right-click My Computer (or whatever you rename it) and then click Properties.

2.      In the System Properties dialog box, click Advanced, and then click Environment Variables.

3.      Under User variables for <username>, click New.

4.      In the New User Variable dialog box, in the Variable name box, type “SSUSER”.

5.     In the Variable Value box, type your VSS username (for example, Admin), and then click Ok.

6.   Repeat these steps to add "SSPWD" as an environment variable whose value is your VSS password.

If not already present, you should also add/edit the following environment variables: SSDIR and PATH. The value for SSDIR should be the path to the \Win32 folder in your VSS installation directory. For example c:\Program Files\Microsoft Visual Studio\VSS\Win32. SSDIR should be set to the path of the SRCSAFE.INI file for your database.

This posting is provided "AS IS" with no warranties, and confers no rights. Microsoft kann für die Richtigkeit und Vollständigkeit der Inhalte in dieser Newsgroup keine Haftung übernehmen. Este mensaje se proporciona "como está" sin garantías de ninguna clase, y no otorga ningún derecho.