Archive: double clicking a file makes it open with?


double clicking a file makes it open with?
I have associated 4 file extensions to a program, using the same code. I have looked at the different registry entries, and they all look the same. Yet somehow, .mvd files doesn't open right away, instead, and OPEN WITH window is opened, and then I can select the correct program (located at the top, pre-selected), and press OK.

How is this possible?

  # Associate .qtv files
WriteRegStr HKCR ".qtv" "" "QuakeWorld.QTV"
WriteRegStr HKCR "QuakeWorld.QTV" "" "QTV Stream Info File"
WriteRegStr HKCR "QuakeWorld.QTV\DefaultIcon" "" "$INSTDIR\ezquake-gl.exe,0"
WriteRegStr HKCR "QuakeWorld.QTV\shell" "" "open"
WriteRegStr HKCR "QuakeWorld.QTV\shell\open\command" "" '$INSTDIR\ezquake-gl.exe "%1"'

# Associate .mvd files
WriteRegStr HKCR ".mvd" "" "QuakeWorld.MVD"
WriteRegStr HKCR "QuakeWorld.MVD" "" "Multi View Demo File"
WriteRegStr HKCR "QuakeWorld.MVD\DefaultIcon" "" "$INSTDIR\ezquake-gl.exe,0"
WriteRegStr HKCR "QuakeWorld.MVD\shell" "" "open"
WriteRegStr HKCR "QuakeWorld.MVD\shell\open\command" "" '$INSTDIR\ezquake-gl.exe "%1"'

# Associate .qwd files
WriteRegStr HKCR ".qwd" "" "QuakeWorld.QWD"
WriteRegStr HKCR "QuakeWorld.QWD" "" "QuakeWorld Demo File"
WriteRegStr HKCR "QuakeWorld.QWD\DefaultIcon" "" "$INSTDIR\ezquake-gl.exe,0"
WriteRegStr HKCR "QuakeWorld.QWD\shell" "" "open"
WriteRegStr HKCR "QuakeWorld.QWD\shell\open\command" "" '$INSTDIR\ezquake-gl.exe "%1"'

# Associate .qwz files
WriteRegStr HKCR ".qwz" "" "QuakeWorld.QWZ"
WriteRegStr HKCR "QuakeWorld.QWZ" "" "QuakeWorld Zipdemo File"
WriteRegStr HKCR "QuakeWorld.QWZ\DefaultIcon" "" "$INSTDIR\ezquake-gl.exe,0"
WriteRegStr HKCR "QuakeWorld.QWZ\shell" "" "open"
WriteRegStr HKCR "QuakeWorld.QWZ\shell\open\command" "" '$INSTDIR\ezquake-gl.exe "%1"'



EDIT: I TRIED THIS ON ANOTHER COMPUTER AND IT WORKED FINE. YOU CAN DELETE THIS THREAD!

This may not fix it but for the path $INSTDIR\ezquake-gl.exe in the shell\open\command entries you may want to put quotes around them in case $INSTDIR ever contains spaces.

Stu


it does contain spaces in my install, and it works fine

(C:\Progrem Files\nQuake\ezquake-gl.exe)


Interesting. I would still recommend it.

Stu