Archive: Program Association


Program Association
I would like to associate ".rpt" file with an app that is sitting under: "C:\Program Files\MyProg\MyProg.exe" .

Is there a one liner that will do this in addition to pick up the icon of MyProg.exe?

Much Appreciated!


There is no one liner. But this can help:

http://nsis.sourceforge.net/archive/...php?pageid=282


I am not sure I understand all the "options" talk... Basically my problem is the following:

I am creating an installer that runs other 3rd party installers. In doing so I need to associate files with "rpt" extension with program that is installed with 3rd party installer.

This seems impossible as people can install the 3rd party software anywhere they want.


Then your problem isn't the association, it's finding where the user have installed the other application. That depends on the other installer, on what it leaves behind, on what it installs. You have to find out how to get the install path yourself or supply some more details so we can try to help you.

The first place I'd look in is the uninstall key (HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall).


This is what is under Uninstall branch ...

C:\WINNT\uninst.exe -f"C:\Program Files\cView\DeIsL8.isu" -cC:\PROGRA~1\cView\_ISREG32.DLL


Is C:\PROGRA~1\cView\ the path you are looking for? If it is and you can't find a better key that doesn't contain the other strings you should use StrCpy to parse it. There are a lot of examples of StrCpy usage and even pre-made functions in the archive that can help you with parsing this.


Maybe you can find a folder in the registery key of the application.