Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Source Safe / September 2004

Tip: Looking for answers? Try searching our database.

Problem with viewer application

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Timo - 27 Sep 2004 11:12 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.