Old 4th November 2007, 16:52   #1
ThaRealMatix
Junior Member
 
Join Date: Nov 2007
Posts: 3
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
ThaRealMatix is offline   Reply With Quote
Old 4th November 2007, 18:04   #2
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
have a look at InstallDirRegKey (or this)
Yathosho is offline   Reply With Quote
Old 4th November 2007, 20:57   #3
ThaRealMatix
Junior Member
 
Join Date: Nov 2007
Posts: 3
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)
ThaRealMatix is offline   Reply With Quote
Old 4th November 2007, 21:12   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
CreateShortCut.
WriteINIStr "file.url" "InternetShortcut" "URL" "http://..."

Stu
Afrow UK is offline   Reply With Quote
Old 5th November 2007, 11:52   #5
ThaRealMatix
Junior Member
 
Join Date: Nov 2007
Posts: 3
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?
ThaRealMatix is offline   Reply With Quote
Old 5th November 2007, 13:59   #6
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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.

code:
!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
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump