MSDN > 論壇首頁 > Visual Studio Source Control and SourceSafe > Unable to create SourceSafe Object
發問發問
 

已答覆Unable to create SourceSafe Object

  • 2006年8月5日 上午 04:34AndyPham 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     

    I'm currently using VSS2005. I did register ssapi.dll by "regsvr32 ssapi.dll"; however, I got error: "could not create object named "SourceSafe" from vbscript below. Please help.

    Set oVSSDatabase = WScript.CreateObject("SourceSafe")

    oVSSDatabase.Open ("C:\VSSData\srcsafe.ini")

    Set oVSSItem = oVSSDatabase.VSSItem("$/Test/testingfile.cs")

    oVSSItem.Parent.LocalSpec = "C:\Projects"

    oVSSItem.Get

解答

  • 2006年8月7日 上午 01:27Alin ConstantinMSFT, 版主使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     已答覆

    Do you get any other error code that may help pinpoint the problem?

    You may need to look in registry at the following key HKEY_CLASSES_ROOT\SourceSafe. If you're working with VSS 2005, it should look like this:

       [HKEY_CLASSES_ROOT\SourceSafe]
       @="Microsoft Visual SourceSafe Automation"
       [HKEY_CLASSES_ROOT\SourceSafe\CLSID]
       @="{783CD4E4-9D54-11CF-B8EE-00608CC9A71F}"
       [HKEY_CLASSES_ROOT\SourceSafe\CurVer]
       @="SourceSafe.8.0"

    You can also try creating directly the VSS 2005 automation object:

       Set oVSSDatabase = WScript.CreateObject("SourceSafe.8.0")

    Alin

所有回覆