Question

I am having an issue with the Microsoft Visual Sourcesafe command line options that I'm hoping someone has run across and can assist me with.

I have the following line in a DOS batch file.

"c:\Program Files\Microsoft Visual SourceSafe\ss.exe" GET 
    "$/Development Projects/Activity" -GL"C:\Compile\Activity" -R -Q 
    -Yname,password

When this line is executed in the batch file the following prompt appears ...

Set C:\Compile\Activity as the default folder for project $/Development Projects/Activity?(Y/N)

I need to suppress this prompt in order to let the script run unattended. I thought the -Q option would allow silent running but it does not suppress this prompt.

I've searched and can't seem to find an option that will remove this prompt. I don't want to set the default folder for the project so I would like to default the answer to "N" if possible.

Was it helpful?

Solution

I think Lieven's answer may be a winner for you, but if it isn't you can try piping an 'N' to the command to answer the prompt for you:

@echo n | "c:\Program Files\Microsoft Visual SourceSafe\ss.exe" GET 
    "$/Development Projects/Activity" -GL"C:\Compile\Activity" -R -Q 
    -Yname,password

OTHER TIPS

-I-Y Answers Yes to all Yes or No questions

http://msdn.microsoft.com/en-us/library/028cya07%28v=vs.80%29.aspx

Scott,

this is how we do a get latestversion for our daily builds.

SET SSDIR="c:\Program Files\Microsoft Visual SourceSafe"
SET SSUSER=Name
SET SSPWD=Password

CD C:\Compile\Activity
SS CP "$/Development Projects/Activity"
SS Get *.* -I -Y -R -W

I'm not entirely sure the Get *.* works. I seem to remember having troubles with that. Our actual script does a get for each file extension we need as in

Get *.pas -I -Y -R -W
Get *.dfm -I -Y -R -W

EDIT: brainstorming over it further, I'd try

SS Get * -I -Y -R-W

Following will answer No to all prompts

-I-N

I encountered this in the past (feel like a previous life to be honest), and couldn't get by it either.

What I ended up doing was writing some jscript to create the VSS Automation object, explicitly open the correct database and perform the various operations necssary, calling the script with cscript from the command line.

I seem to remember having different scripts for CheckOuts, CheckIns and Gets, though that was probably overkill.

Sorry I can't be of anymore help, if I had the code handy I'd post it here.

SourceSafe working folders are kept in the ss.ini text file located under the users subfolder of your SSDIR. You'll get prompted everytime you move to a new PC or login to SS as a new user to checkout files. To suppress this you should use the SS Workfold project folder command to explicity set your Working folder or prepopulate the ss.ini file with your Working folder preferences.

You might try the following. Used with the -GF option to enable it to pick up the commandline variable change. Maybe it will work with -GF. Not certain though.

SET Force_Dir=YES

"c:\Program Files\Microsoft Visual SourceSafe\ss.exe" GET 
    "$/Development Projects/Activity" -GF -GL"C:\Compile\Activity" -R -Q 
    -Yname,password
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top