[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Registering an extension in Windows 7

Posted on 2010-01-09
4
Medium Priority
?
806 Views
Last Modified: 2013-12-03
I've had a C++ (MFC VC 6.0) application running for years.

As part of it, it registers the .fre extension to the application. The .exe is in a folder in C://Program Files.

Under Windows 7, it installs normatlly, but the registration code doesn't seem to work. The system doesn't seem to know about the .fre extension after it runs.

I've included the code below. What do I need to change to work under W7 ?

CMultiDocTemplate* pDocTemplate;
pDocTemplate = new CMultiDocTemplate(
  IDR_WINFRETYPE,      // Winfree\nF00_\nWinfree Document\n\\
            //Winfree Files (*.fre)\n.fre\nWinfreeFile\nWinFree File
  RUNTIME_CLASS(CWinfreeDoc),
  RUNTIME_CLASS(CMDIChildWnd),        // standard MDI child frame
  RUNTIME_CLASS(CWinfreeView));
AddDocTemplate(pDocTemplate);
RegisterShellFileTypes( );                  // added to register .fre
0
Comment
Question by:DickStone
  • 2
  • 2
4 Comments
 
LVL 49

Expert Comment

by:DanRollins
ID: 26276121
It should work under Win7.  I suggest that you see how far (if at all) it got by using RegEdit.  Look in HKCR for .fre  and the actual commad etc, should be under frefiles
The most common problem with Win7 is the UAC  -- it prevents non-administrators from monekying with the registry.  You should set up the file associations during installation so the user will not need to promote to administrator during each run.
0
 

Author Comment

by:DickStone
ID: 26277510
I don't know how to change the installation to register the .fre file at the location of the .exe.

I'm attaching the InstallShield script if you can help with this...

Also, this script might also be having installation problems with W7 (64 bit), but I'm not sure.
0
 
LVL 49

Accepted Solution

by:
DanRollins earned 2000 total points
ID: 26281881
One possibility from http://msdn.microsoft.com/en-us/library/538tbk4a(VS.71).aspx 
e registration database already associates a given filename extension with another file type, no new association is created. See the CDocTemplate class for the format of strings necessary to register this information.
Check to see if the .FRE file extension has been put in place by a different program (perhaps an older version of your own program).
Another thing to try:
Use the ClassWizard to create base-minimal MDI project.  In the Wizard, set the file type to XYZ (or some other file extension that is not registered -- again, I urge you to use RegEdit to check out the HKCR section).
Run the program on the problem platform and see if XYZ files are correctly registered for you.  If so, then the problem may be with the format of your IDR_WINFRETYPE string in your resource file.  Note: There can be more than one of these, depending on the national language.  Compare your string to the one the ClasssWizard creates for your testing program.
0
 

Author Comment

by:DickStone
ID: 26341197
Do you know someone that is strong on InstallShield that I could pay to update the installation file for me for (1) adding registration, (2) fixing 64 installation issues?
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

640 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question