Before you begin, you need to know the path to your VSS database directory, for example it may be:
C:\Program Files\Microsoft Visual Studio\Common\VSS
The VSS database directory contains a file named SrcSafe.ini, that's how you can identify it. You can read more at Microsoft's website.
You will also need to locate the vss_fbupdate.wsf file in the FogBugz\Accessories\SourceControl\VSS folder. If you are a trial user, you can download the trial versions of this script by logging into FogBugz and clicking "Demo Source Control Integration" on the main menu.
1. Edit the vss_fbupdate.wsf file as follows (Trial users: You only need to edit the FB_VSS_USER and FB_VSS_PASSWORD variables. The rest of this step is set up automatically for your trial server.):
- Edit the FB_PATH variable and the script will pick up the needed info from the registry. (Note you will have to add VSSUser and VSSPassword keys to the registry at
HKEY_LOCAL_MACHINE\SOFTWARE\Fog Creek Software\FogBugz\[%FB_PATH%]).
- You can override what is in the registry and manually set the FB_VSS_USER and FB_VSS_PASSWORD variables.
- Set the value of BUGZ_SERVER to the DNS name of the web server running FogBugz, for example " www.example.com".
- Set the value of BUGZ_URL to the virtual path to your FogBugz installation. For many sites this is "/FogBugz/". Just take the full URL of your FogBugz installation - "http://www.example.com/bugz/" and remove the "http://www.example.com" part. (If FogBugz is running at the root, use "/").
- If you are using the PHP version of FogBugz, change CVSSUBMIT from "cvsSubmit.asp" to "cvsSubmit.php".
- If you are using FogBugz in another language, you will need to update the strings FogBugz checks from the journal.txt file. In particular, the sItemVersion and sItemAction comparisons will need to be updated.
2. Uncomment and edit the following line in vss_fbupdate.wsf:
- For each VSS project you have, add a line to the script beneath the commented out line
'Call ProcessVSSJournal("Project Name", "Path to VSS Database directory")
For example:
Call ProcessVSSJournal("Test", "C:\Program Files\Microsoft Visual Studio\Common\VSS")
Note: If you are using MySQL, you cannot have an underscore in the file path, since it will be replaced by MySQL with a dash, and you cannot use a backslash \ since MySQL will interpret that as an escape character, so use forward slashes instead /
3. For each VSS Database you have, run the Admin Console and choose Tools->Options. Make sure it is set to create a file called journal.txt in the VSS Database directory.
Using the example above, the "Log all actions in journal file" would point to "C:\program files\microsoft visual studio\common\vss\journal.txt". If VSS says no such path exists, try using a UNC path (you will then have to use this in vss_fbupdate.wsf as well).
![[Image]](HelpPics/vss.gif)
4. Set the vss_fbupdate.wsf file to run as a scheduled task every so often (maybe hourly or even more often if you like). The task will complete very quickly so do not worry about this script running too often. Make sure this task runs as a user that has priveleges to rename/delete files in the VSS directories (usually NOT the FogBugz user, but instead an admin on the machine). Use the //B option to wscript so the script does NOT run in interactive mode:
c:\winnt\system32\wscript.exe //B d:\progra~1\fogbugz\accessories\SourceControl\vss\vss_fbupdate.wsf
Since this is run on the command line, you can't have a space in Program Files, hence the abbreviation.
5. You must make sure that the FogBugz user or whomever you installed FogBugz to run as has READ access on all your VSS folders and all subfolders. The user must also have FULL CONTROL on the names.dat and the rights.dat files, and the LoggedIn directory. Also it must have FULL CONTROL ON THE SSUS.DLL and SSAPI.DLL in order to create the SourceSafe COM object.
6. We suggest setting up VSS to run on the same machine as FogBugz so that you can use our internal tools to view diffs and logs. If this is not feasible for you, you can install a separate instance of FogBugz on IIS on the VSS machine, whose sole purpose is to read VSS files and show you the diffs and logs. Be sure the FogBugz user in that IIS has permissions on the VSS files on that server as specified above. Trial users (and those who do not wish to install FogBugz on the same machine that runs VSS) can use VSS Remoting to display diffs and logs. Finally, log into FogBugz on your main web server, go to the Site page and follow the examples provided for source control urls.