I am using Visual SourceSafe 6.0a (build 8987) with Windows 2000. I
have problems with file associations. Initially, after installing VSS
to my PC, it displayed all .c and .h files using VSS's own, default
viewer. Later, I installed GTK2 text editor and Bloodshed Dev-C++
compiler/IDE to my PC. After these apps where installed, VSS always
opens .txt files with GTK2 and .c and .h files with Dev-C++. I have
never configured VSS to use these apps.
In Windows Explorer, I have configured .c, .h and .txt files to be
opened with CodeWright, but for some reason, VSS doesn't use these
settings. I tried to do some groups.google.com seaching, and found out
that it should be possible to configure the viewer apps by editing
ss.ini. So, I put the following lines to ss.ini:
.TXT = "C:\Program Files\Starbase\CodeWright\cw32.exe" %1
.C = "C:\Program Files\Starbase\CodeWright\cw32.exe" %1
But this doesn't help either, VSS still uses GTK2 and DevC++ to open
txt and C files. BTW, there are at least two ss.ini files on my PC:
C:\Program Files\Microsoft Visual Studio\VSS\users\admin\ss.ini
and C:\Program Files\Microsoft Visual Studio\VSS\users\guest\ss.ini.
Which is the correct one? I put the lines to both files.
I also put the viewer configurations to file
C:\Program Files\Microsoft Visual Studio\VSS\srcsafe.ini, but it
doesn't help either.
After that, I used regedit to see if these settings are in Windodws
registry. I checked HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\SOURCESAFE\
and also HKEY_USERS\s-xxxx\Software\Microsoft\SourceSafe\, but
couldn't find any settings for viewer applications.
Where does VSS hide these settings? Any help would be greatly
appreciated.
BR,
Timo
Joe Masters - 28 Sep 2004 04:44 GMT
The program in which the file is opened is selected by one of the following
means, in the following order:
1.. VSS looks in its initialization files for a line with the extension of
the file being viewed.
2.. VSS uses Microsoft Windows Explorer (the registration database and
Win.ini) to associate an application with the file extension.
3.. VSS looks for your entry in the File Viewer option on the General tab
in the SourceSafe Options dialog box.
4.. If VSS cannot determine a file association after using these methods,
VSS displays the file using its own editor.
Maybe one of the apps is changing win.ini?
Joe
>I am using Visual SourceSafe 6.0a (build 8987) with Windows 2000. I
> have problems with file associations. Initially, after installing VSS
[quoted text clipped - 32 lines]
> BR,
> Timo
Timo - 28 Sep 2004 09:01 GMT
> I am using Visual SourceSafe 6.0a (build 8987) with Windows 2000. I
> have problems with file associations. Initially, after installing VSS
[quoted text clipped - 21 lines]
> C:\Program Files\Microsoft Visual Studio\VSS\srcsafe.ini, but it
> doesn't help either.
<CLIP>
I figured out few reasons for this problem:
First, I was editing the wrong ss.ini file. The database I am using is
located at network drive, and the ss.ini file is also there. When I
put the lines
.C = "C:\Program Files\Starbase\CodeWright\cw32.exe" etc. to correct
ini file, VSS opened the files in Codewright. But, there is one more
problem: if I open several files in VSS, it seems that from 2nd file
on, VSS always deletes the temporary file it creates for viewer
application. And CodeWright is so "intelligent" that it notices that
the file it is viewing has been deleted, and displays a dialog where
user is prompted to delete the file or save it with new name. Very
annoying. When notepad or other "stupid" app is used as viewer, there
isn't this kind of problem, notepad doesn't notice that the file it is
viewing has been deleted.
About the file associations. It seems that GTK2 text editor and
Dev-C++ installations created/modified few registry keys. In
HKEY_CLASSES_ROOT there is ".txt" key, which has value "txtfile". The
key "txtfile" then has in its "shell/open/command" branch GTK2 editor
executable name. Changing this to for example notepad.exe causes the
file to be opened in notepad.
Also, Dev-C++ created/modified the "HKEY_CLASSES_ROOT/.c" key, there
was value "DevCpp". The key "DevCpp" then then had the DevCpp
executable name as key value, which caused all .c files to be opened
in Dev-C++ IDE in VSS. I changed this "HKEY_CLASSES_ROOT/.c" back to
"cfile".
What a hell of a mess! ;) In Windows, even simple things are made so
compilated...
Timo