Microsoft VSS: Create Database Problem...
This is going to be a little boring for the Non Microsoft source control product users (CVS et al)
Operating System: Windows XP Professional
Microsoft Product: Visual Studio 6.0c
Objective: Create a new Source code repository database, add users, change password.
Process: Open Visual Source Safe Admin, it will ask you for an already existing database. It creates a dummy database during installation. Choose that which should usually be in the "C:\Program Files\Microsoft Visual Studio\Common\VSS" directory. Or choose any other existing database and Log in using proper credentials open VSS Admin.
Now Click on tools and create database. It should ask you for a location. Choose desired location by clicking on browse and geeks may type in the memorized location. keep the (New 6.0 database) option checked if you have VSS 6.0 installed on your machine. Click Ok.
Problem: It should look like it created some database. But nothing really happens. The dialog box just closes. I thought after creation it would open up the database. So what I did was Clicked on Users menu and clicked on Open Source Safe Database and pointed to the newly created database and clicked open. Gives me an error saying "Invalid DOS Path: C:\Temp\users\admin\ss.ini". Temp is the directory I was creating the database in.
So I opened Explorer and browsed to the mentioned location. What I saw was that the entry for the default users guest and admin were there in the users.txt. but the folders that should have been created for guest and admin were not created. So I copied the folders from an existing VSS database and tried to open the VSS. surely it opened. but when I tried to add a user, same error message.
I googled for it and searched for a solution pretty long and then found out that if you create a file template.ini and add the following text into it, and store it into the users directory, it would work. I tried it and it did work... I thought I should blog this. So next time I or someone else falls into the same pit, It could be found on my blog itself.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Text in the template.ini stored into the users directory
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
; ss.ini
;
; This file contains all the variables that "customize" Visual
; SourceSafe to your particular needs. The ss.ini variables are
; documented in the Visual SourceSafe User's Manual. Only a few of them
; are placed in this file by default.
Text in the template.ini stored into the users directory
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
; ss.ini
;
; This file contains all the variables that "customize" Visual
; SourceSafe to your particular needs. The ss.ini variables are
; documented in the Visual SourceSafe User's Manual. Only a few of them
; are placed in this file by default.
; Visual C++ programmers should remove the semicolon from the following
; line, to uncomment it. Other programmers REPLACE the line with
; different masks.
; Relevant_Masks = *.c, *.h, *., *.asm
; line, to uncomment it. Other programmers REPLACE the line with
; different masks.
; Relevant_Masks = *.c, *.h, *., *.asm
; The following line prevents you from being asked for a checkout
; comment.
Checkout_Comment = -
; comment.
Checkout_Comment = -
; The following lines force Visual SourceSafe not to execute certain
; file types.
.reg (Win) = notepad.exe
.vbp (Win) = notepad.exe
.vcp (Win) = notepad.exe
.mak (Win) = notepad.exe
.bat (Win) = notepad.exe
; file types.
.reg (Win) = notepad.exe
.vbp (Win) = notepad.exe
.vcp (Win) = notepad.exe
.mak (Win) = notepad.exe
.bat (Win) = notepad.exe
; Your current Visual SourceSafe project.
Project = $/
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Project = $/
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------