Skip to content
⌘ NSIS Forum Archive

Is it possible to test if data exist ?

5 posts

cooladn#

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
Guest#
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.
cooladn#
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
Schultz#
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
cooladn#
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: