Old 8th January 2006, 21:25   #1
Necrocide
Guest
 
Posts: n/a
Question Problem with Shortcuts.

Hey there.

First of all thanks for this great piece of software, but I have ran into a problem with the shortcuts.

It can easily create the shortcuts, in the start menu, but when clicking on them it opens command promt, and closes again = something is wrong. I have looked though my code for some time now, and I don't see what is wrong?
For some reason the shortcut target will be

"C:\DOCUME~1\ADMINI~1\MENUEN~1\PROGRA~1\NEVERL~1\NEVERL~1.EXE"

Which don't exist? Can anyone help me?

--

Here is my script;

code:

; Neverlands POL Edition Install Application
; v. 1.5
; Made by Necrocide - 2006

;--------------------------------
;Include Modern UI

!include "MUI.nsh"

;--------------------------------
;General

;Name and file
Name "Neverlands, The POL edition"
OutFile "neverlands_polnl_installer_1.5.exe"

;Default installation folder
InstallDir "$PROGRAMFILES\"

;Get installation folder from registry if available
InstallDirRegKey HKLM "SOFTWARE\Origin Worlds Online\Ultima Online\1.0" "InstCDPath"

;--------------------------------
;Variables

Var STARTMENU_FOLDER

;--------------------------------
;Interface Settings

!define MUI_ABORTWARNING

;--------------------------------
;Pages

!insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Docs\Modern UI\License.txt"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY

;Start Menu Folder Page Configuration
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "SOFTWARE\Neverlands"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Neverlands, the POL edition"

!insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER

!insertmacro MUI_PAGE_INSTFILES

!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES

;--------------------------------
;Languages

!insertmacro MUI_LANGUAGE "English"

;--------------------------------
;Installer Sections

Section "Neverlands POL files" SecDummy

SetOutPath "$INSTDIR"

File hues.mul
File multi.idx
File neverlands.url
File staidx0.mul
File tiledata.mul
File skills.idx
File login.cfg
File multi.mul
File polnl_client.exe
File skills.mul
File verdata.mul
File statics0.mul

;Store installation folder
WriteRegStr HKCU "Software\Neverlands" "InstallDIR" $INSTDIR

!insertmacro MUI_STARTMENU_WRITE_BEGIN Application

;Create shortcuts
CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Neverlands.ink" "$INSTDIR\polnl_client.exe"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Website.ink" "$INSTDIR\neverlands.url"

!insertmacro MUI_STARTMENU_WRITE_END

SectionEnd



Thanks in advance!
  Reply With Quote
Old 9th January 2006, 07:34   #2
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
ink->lnk ?
Takhir is offline   Reply With Quote
Old 9th January 2006, 08:47   #3
aDamas_CH
Junior Member
 
Join Date: Jan 2006
Location: Le Locle, Switzerland
Posts: 2
I also have a problem with shortcuts, how can you define where the taget programm is started?
aDamas_CH is offline   Reply With Quote
Old 9th January 2006, 08:55   #4
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
Manual, 4.9.3.4 CreateShortCut:
$OUTDIR is used for the working directory. You can change it by using SetOutPath before creating the Shortcut.
Takhir is offline   Reply With Quote
Old 9th January 2006, 09:30   #5
aDamas_CH
Junior Member
 
Join Date: Jan 2006
Location: Le Locle, Switzerland
Posts: 2
Thanks I had miss this sentence in the manual... RTFM as we say.
It's working well now.
aDamas_CH is offline   Reply With Quote
Old 9th January 2006, 10:48   #6
Necrocide
Guest
 
Posts: n/a
Thanks for the replies, still I can not get it working, this is what I changed? Hmmmmm...

code:

;Store installation folder
WriteRegStr HKCU "Software\Neverlands" "InstallDIR" $INSTDIR

SetOutPath "$OUTDIR"

!insertmacro MUI_STARTMENU_WRITE_BEGIN Application

;Create shortcuts
CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Neverlands.Ink" "$OUTDIR\polnl_client.exe"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Website.Ink" "$OUTDIR\neverlands.url"

!insertmacro MUI_STARTMENU_WRITE_END

SectionEnd



What am I doing wrong? :/
  Reply With Quote
Old 9th January 2006, 11:24   #7
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
Ink->lnk (INK->LNK)
Instructor is offline   Reply With Quote
Old 9th January 2006, 12:25   #8
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Just to say what L.N.K. stands for... it's LINK

-Stu
Afrow UK is offline   Reply With Quote
Old 9th January 2006, 15:04   #9
Necrocide
Guest
 
Posts: n/a
Doh. Thanks everyone, it's all working now - lol.
  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