Good day Bros. I have been working on some automation to extract data from an old Visual Source Safe database. Based on advice I got in this thread I got it working by executing the SS.exe command line interface for VSS, using the backtick method to capture results.

For reasons I need not go into, I upgraded from VSS 6.0 to VSS 2005, which the installer put in a different location. The UI works fine but it broke my script. When I try to run it now, for example (simplified):

#!/usr/bin/perl -w use strict; chdir('C:\Program Files (x86)\Microsoft Visual SourceSafe'); my $result = `SS Dir \"$/\" -Yadmin`; print $result;
I get the error No VSS database (srcsafe.ini) found.  Set the SSDIR environment variable to the path of srcsafe.ini for your VSS database.

I have set that environment variable and it still doesn't work, but that's not a Perl issue. The Perl issue is that when I open a command window, cd to the directory above, and execute the same command as above, it works fine and gives the expected output (with no complaints about the environment variable). So why would the script fail?

No cerveza, no trabajo.

In reply to VSS automation strange problem by cormanaz

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.