This piece of code seems to work on my XP box while on windows 2000 it does not?? I am also having trouble in picking up the appropriate icon from the cView (third party app). Help?!
Announcement
Collapse
No announcement yet.
File Association / What am I doing wrong? WinXP vs. Win2K
Collapse
X
-
The Code (I forgot to attach)
Function fileAssociation
;create file association
ReadRegStr $0 HKCR "Applications\cView.exe\shell\open\command" ""
StrCpy $9 " $\"%1$\""
StrCpy $1 $0
; remove end characters
Call removeFromString
; remove inital quote
StrCpy $9 "$\""
Call removeFromString
; remove end quote
StrCpy $9 "$\""
Call removeFromString
WriteRegStr HKCR ".rpt" "" "Applications\cView.exe"
WriteRegStr HKCR ".rpt\DefaultIcon" "" $1,0
WriteRegStr HKCR "Applications\cView.exe" "" "cView File"
WriteRegStr HKCR "Applications\cView.exe\shell" "" "open"
FunctionEnd
-
-
when I do start run: C:\Program Files\cView\cView.exe
works like a charm and opens up!
but when I do something like this:
C:\Program Files\cView\cView.exe file.rpt
it does not open the file
funny thing is that if I manually set it up (association) it opens the file.
Comment
-
Comment