Archive: how to change $SMPROGRAMS to a non default path


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


I don't understand what you mean? Are you talking about the link start in path? That is set with SetOutPath.

Stu


Yes,

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

start->All Programs->cx250->cx250 tools


What is wrong with typing "$SMPROGRAMS\$StartMenuGroup\cx250 tools\"?? Or even "$SMPROGRAMS\cx250\cx250 tools\"??

Stu


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


Assuming it is always X:/... then you could do this:

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

$R0 would now be your 'cx250'.

Stu


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


Then either delete the original first or create your own with a different name or in a different folder.

Stu