Archive: Is it possible to test if data exist ?


Is it possible to test if data exist ?
Hi!
i have a new question. :)
As someones know, i make a 3D ActiveDesktop program.
To play animation, i use Viewpoint Player.

As i don't want to install it if user have this player, i would like to know if it's possible to detect it.

its position in regedit is :

HKCR ".mts" "Viewpoint Media File.mts" (a REG_SZ string)


So if you have an idea

thinks for your help


Just use ReadRegStr to read the position of .mts in HKCR. If it is registered to ViewPoint (so use StrCmp) then it is installed!

-Hendri.


Doesn't work !
i've written this but it doesn't ork: why ?

Section ""
ReadRegStr $1 HKCR "" ".mts"
StrCmp $1 "" doesNotExist
Goto done
doesNotExist:
ExecWait viewpoint.exe
done:
SectionEnd


Re: Doesn't work !

Originally posted by cooladn
i've written this but it doesn't ork: why ?

Section ""
ReadRegStr $1 HKCR "" ".mts"
StrCmp $1 "" doesNotExist
Goto done
doesNotExist:
ExecWait viewpoint.exe
done:
SectionEnd
I think it should be
Section ""
ReadRegStr $1 HKCR ".mts" ""
StrCmp $1 "" doesNotExist
Goto done
doesNotExist:
ExecWait viewpoint.exe
done:
SectionEnd

i've found the solution!
i don't redirect correctly, so this is the good code

ReadRegStr $1 HKLM "" ".mts"
StrCmp $1 "" viewpoint
ExecWait VMPFullInstall.exe
viewpoint: