Xaprb

Stay curious!

How to use the Visual SourceSafe automation interface

with 5 comments

Microsoft Visual SourceSafe provides an automation interface that can be used from within VBScript, VB6 and other languages. This article lists the options for automating SourceSafe, provides links to documentation, and discusses some bugs that are impossible to work around.

Documentation

I am in the unenviable position of needing to write a VBScript program to interact with SourceSafe. Unfortunately the documentation is hard to find and not at all clear or user-friendly. Here are the two links I find useful:

Bugs

I notice a number of bugs. For instance, no matter what I do, I cannot get the IVSSItem.Get or IVSSItem.CheckOut methods working in VBScript (they do work in VB6). I just get strange errors about “Type mismatch” or “Invalid DOS path:” depending on how I call the method. I see others on the web have had the same problem, but no solution. It’s pretty miserable.

Command-line interface

There is a command-line tool, SS.EXE, but it is almost totally unusable for scripting purposes. It has strange dependencies on the Visual SourceSafe client program, requires environment variables instead of accepting command-line arguments, and does very frustrating things that cannot be overriden easily. For example, the “get” command gets the file into the current directory even if you specify a subdirectory; in other words, the command ss Get dir/file.txt will get the file into the current directory, not dir. This is a shame, as this is the command I really want to use because it doesn’t work via the automation interface in VBScript.

Further Reading:

Written by Xaprb

October 12th, 2005 at 3:54 pm

Posted in Uncategorized

5 Responses to 'How to use the Visual SourceSafe automation interface'

Subscribe to comments with RSS

  1. pruiser

    25 Aug 06 at 11:19 am

  2. Yes, and Microsoft have apparently completely removed that page from MSDN. Well, fortunately archive.org has it, because it’s darned important information. Hey Microsoft, why don’t you quit deleting documentation?

    I’ll fix the link in the article.

    Xaprb

    25 Aug 06 at 1:42 pm

  3. I was looking for the same Visual SourceSafe 6.0 Automation and I cold not find it on the Microsoft web site either. This is really annoying. There are so many articles related to SourceSafe and VB6 development that has been removed and the suggestion Xaprb made for finding it on the archive.org web site failed for me again.

    Is there anywhere on the web where I can find any documentationon the VSS API for VB6? Please help.

    KamiT

    29 Jan 07 at 4:09 am

  4. I don’t know. I guess they are just “deprecating” older versions of stuff because they feel the need to sell the newer version instead. All hail the almighty dollar.

    Xaprb

    29 Jan 07 at 8:40 am

  5. TheLurker

    19 Apr 07 at 8:50 am

Leave a Reply