|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Nov 2005
Posts: 10
|
how to associate a certain file type with the launched program with nsis
Dear all
I created a installer for my program with NSIS, now it works.But One certain file type recognized by my program can't be open by double clicking. Maybe it needs to write some information which associates a certain file type with my program to register when installing. NSIS can do that? If so, how can it do this? look forward to your reply. thanks dongfang |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: May 2005
Location: New Zealand
Posts: 916
|
There is an example of this in the nsis setup script (associates .nsi and .nsh with notepad). It is located at '${NSISDIR}\examples\makensis.nsi'. Search it.
"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me) NSIS 3 POSIX Ninja Wiki Profile |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Nov 2005
Posts: 10
|
here is my code for associating file type with my program:
WriteRegStr HKCR ".qif" "" "HDDImage" WriteRegStr HKCR "HDDImage" "" "maxtor HDD File" WriteRegStr HKCR "HDDImage\shell\open" "" "open qif file" WriteRegStr HKCR "HDDImage\shell\open\command" "" 'ImageJ.bat "%1"' when double clicking .qif file, I get this error message"windows cannot find'c:\program File\ImageJ\E16YDPTN\C39994H03W001R000.QIF',Make sure you typed the name correctly, and then try again. To search for a file, click the start button,and then click search." I am crazy with this problem and don't know what is the problem. thanks in advances dongfang |
|
|
|
|
|
#4 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
It's probably something wrong in your batch file. Perhaps you are missing quotes around %1.
-Stu |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Nov 2005
Posts: 10
|
here is my batch file:
pushd C:\Program Files\ImageJ start wjview /cp ij.jar;swing.jar;plugins ij.ImageJMain %1 popd |
|
|
|
|
|
#6 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Try putting quotes around %1
-Stu |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Nov 2005
Posts: 10
|
Stu
I have tried to chanage the bat file like this : pushd C:\Program Files\ImageJ start wjview /cp ij.jar;swing.jar;plugins ij.ImageJMain "%1" popd or like this : pushd C:\Program Files\ImageJ start wjview /cp ij.jar;swing.jar;plugins ij.ImageJMain '%1' popd But both of them can't work and still have the same error message. I still haven't had any idea about this problem. thank you very much. dongfang |
|
|
|
|
|
#8 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Try this:
pushd C:\Program Files\ImageJ start wjview '/cp ij.jar;swing.jar;plugins ij.ImageJMain "%1"' popd -Stu |
|
|
|
|
|
#9 |
|
Junior Member
Join Date: Nov 2005
Posts: 10
|
pushd C:\Program Files\ImageJ
start wjview '/cp ij.jar;swing.jar;plugins ij.ImageJMain "%1"' popd my progran cann't run with these commands, so file association also doesn't. Before creating installer, I run this project with bat file and create a simple program to associate qif file type with this program, and double clicking works well. so my bat file is right. If the installer doesn't associate file type with program, and then I use the simple associated program, double clicking doesn't work. Is there some trick I don't know about? thanks dongfang |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|