Archive: Get directory of installed program


Get directory of installed program
Hi everyone,

i am sorry i am new to nsis but i didn't find any answer in wiki's, tuorials or so so i just wanted to ask the following.

I want to create an installer which actually only does one thing: Copy some files into a subdirectory of an installed application.

So what i need is the correct code to let nsis search for this Program directory. Does anyone knows how i can do that by using the windows registry or searching for an executable?

Thx

ThaRealMatix


have a look at InstallDirRegKey (or this)


And how could i create a link to the uninstaller and the website of my installer /7 a website into that installtion directory and the directory where this Program has it's shortcuts?

(im sorry i didtn find it on that site)


CreateShortCut.
WriteINIStr "file.url" "InternetShortcut" "URL" "http://..."

Stu


Yes... but how can i get the directory in the Start MEnu of a previous installed application?

for Example:

Word ist installed and it is is linked in Start - Programs -> MS Office

how can i get this Shortcut directory and ADD an entry for my internnet site and my uninstaller?


There is no way to tell exactly because users can move and rename the folders, but if you look for a folder called "Microsoft Office" under $SMPROGRAMS, i.e.

!include LogicLib.nsh
...

${If} ${FileExists} `$SMPROGRAMS\Microsoft Office\*.*`
CreateDirectory `$SMPROGRAMS\Microsoft Office`
CreateShortCut `$SMPROGRAMS\Microsoft Office\My App Uninstall.lnk` `$INSTDIR\Uninstall.exe`
WriteINIStr `$SMPROGRAMS\Microsoft Office\web.url` InternetShortcut URL `http://myapp.com`
${EndIf}
Stu