Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

File Associations


4 replies to this topic

Tony Micheletti

Tony Micheletti
  • Members
  • 22 posts

Posted 25 July 2001 - 18:02

Is there an easy way to prompt the user to whether or not they want file extensions to be associated with the current program being installed?

Kate

Kate
  • Members
  • 61 posts

Posted 26 July 2001 - 22:04

You could do it using InstallScript.

Pop up a yes/no box. Set the property based on their answer. Then set the "file association" function (see example below) to run based on the property just set.

ex:
function SetZZZ (hMSI)


NUMBER nZzzResult;

begin



// Set .zzz to be a text file.
RegDBSetDefaultRoot(HKEY_CLASSES_ROOT);
RegDBCreateKeyEx(".zzz","");

nZzzResult = RegDBSetKeyValueEx(".zzz","",REGDB_STRING,"txtfile",-1);

if nZzzResult <0 then
MessageBox ("Did not set .zzz files correctly", INFORMATION);

endif;    

end;

(Edited by Kate at 10:04 pm on July 26, 2001)


Tony Micheletti

Tony Micheletti
  • Members
  • 22 posts

Posted 26 July 2001 - 23:42

Kate,

I made an InstallScript and then created a Custom Action to run the script, but when I try and build the release I get the following error:

** Error -1024: File P:\MaxSim\MaxSim\Setup\Product Configuration 1\Interm\Setup.inx not found. Cannot stream the file into the Binary table


Any ideas how to fix this error?  My scipt compiled without any errors or warnings so I don't think it is that.  Thanks again for all your help.


Tony Micheletti

Tony Micheletti
  • Members
  • 22 posts

Posted 27 July 2001 - 17:31

Kate,

I fixed the error, but I don't think the script is working properly.  Here is what I need to accomplish.

There are three file extensions that the software that is going to be installed is going to be using.  There are two different programs that are being installed.  One is going to use .mxc and the other program uses .mxs and .mxr.  The script compiles fine, but when I checked to see if it associated the file types in windows by going to My Computer->View->Options->File Types, they aren't displayed there.  Do you have any idea of how to get it to appear there?