Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 25th November 2007, 08:09   #1
MoshiachNow
Junior Member
 
Join Date: Jan 2007
Posts: 7
how to change default path to a non default

HI,

As simple one.

I need to change the link path for my program which currently is created under "Start->Programs" ($SMPROGRAMS).

The code is :

Section -post SEC0001
WriteRegStr HKLM "${REGKEY}" Path $INSTDIR
WriteRegStr HKLM "${REGKEY}" StartMenuGroup $StartMenuGroup
WriteUninstaller $INSTDIR\uninstall.exe
SetOutPath $SMPROGRAMS\$StartMenuGroup
CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall $(^Name).lnk" $INSTDIR\uninstall.exe
SetOutPath $INSTDIR
CreateShortcut "$SMPROGRAMS\$StartMenuGroup\$(^Name).lnk" $INSTDIR\colorserver_upd.exe
====================
How do I change the $SMPROGRAMS path to point to some non default link path (already existing) ?
thanks
MoshiachNow is offline   Reply With Quote
Old 25th November 2007, 14:21   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
I don't understand what you mean? Are you talking about the link start in path? That is set with SetOutPath.

Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 26th November 2007, 05:13   #3
MoshiachNow
Junior Member
 
Join Date: Jan 2007
Posts: 7
Yes,

I need to change the link only from $SMPROGRAMS to som eother customer created link.ex:

start->All Programs->cx250->cx250 tools
MoshiachNow is offline   Reply With Quote
Old 26th November 2007, 08:30   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
What is wrong with typing "$SMPROGRAMS\$StartMenuGroup\cx250 tools\"?? Or even "$SMPROGRAMS\cx250\cx250 tools\"??

Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 26th November 2007, 08:59   #5
MoshiachNow
Junior Member
 
Join Date: Jan 2007
Posts: 7
Thanks,I got it.
Another question.

the "cx250" is product dependent and I must get it from some envitomental variable.
Normally the variable %scisys% will hold: "c:/cx250".
What is the way to set param $product from the above to be equal to "cx250" ?
(I have no experience with doing this in NSIS environment...)
thanks
MoshiachNow is offline   Reply With Quote
Old 26th November 2007, 09:11   #6
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
Assuming it is always X:/... then you could do this:

ReadEnvStr $R0 SCISYS
StrCpy $R0 $R0 `` 3

$R0 would now be your 'cx250'.

Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Old 26th November 2007, 10:09   #7
MoshiachNow
Junior Member
 
Join Date: Jan 2007
Posts: 7
Great !

I have now added :
section
#set the product link path
ReadEnvStr $Product SCISYS
StrCpy $Product $Product `` 3
StrCpy $StartMenuGroup "$Product\$Product Tools"

And installer creates the links as required under:
start->All Programs->cx250->cx250 tools

The problem is that the above link already exists,created by the cx250 product installation (It appears above the top separator line in start->all programs).
I need to install my staff there,without creating an extra identical link...
thanks
MoshiachNow is offline   Reply With Quote
Old 26th November 2007, 12:43   #8
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
Then either delete the original first or create your own with a different name or in a different folder.

Stu

Need an installer? http://www.afrowsoft.co.uk
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp 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