Old 7th December 2004, 18:45   #1
jonnebonne
Junior Member
 
Join Date: Nov 2004
Location: Oslo, Norway
Posts: 12
Need help with a code...

I have this code:
code:

!define PRODUCT_NAME "Test"
!define PRODUCT_VERSION "6.66"
!define PRODUCT_PUBLISHER "Unkn0wN"
!define PRODUCT_WEB_SITE "http://www.mypage.com"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\file.exe"


; MUI 1.67 compatible ------
!include "MUI.nsh"

; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "C:\Documents and Settings\J0nathan\Desktop\Icon.ico"

; Welcome page
!insertmacro MUI_PAGE_WELCOME
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page

!insertmacro MUI_PAGE_FINISH
Icon "C:\Documents and Settings\J0nathan\Desktop\Icon.ico"

; Language files
!insertmacro MUI_LANGUAGE "English"

; MUI end ------
Function .onInit
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "Myfile" "$WINDIR\file.exe"
SetSilent silent
MessageBox MB_OK "Installation Complete!"
FunctionEnd
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "C:\Documents and Settings\J0nathan\Desktop\Test!\test.exe"
InstallDir "$WINDIR"
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
ShowInstDetails show

Section "MainSection" SEC01
SetOutPath "$WINDIR"
SetOverwrite on
File "C:\Documents and Settings\J0nathan\Desktop\Test!\file.exe"
SectionEnd



But I get maney strange errors... And I don't know why.
Here are some of the errors:
code:

Error in macro MUI_INTERFACE on macroline 61
Error in macro MUI_PAGE_INIT on macroline 3
Error in macro MUI_PAGE_WELCOME on macroline 5
Error in script "C:\Documents and Settings\J0nathan\Desktop\Test!\Test.nsi" on line 19 -- aborting creation process



Can someone here please help me?
Thanks!
jonnebonne is offline   Reply With Quote
Old 7th December 2004, 19:47   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Please post the whole compile log.

-Stu
Afrow UK is offline   Reply With Quote
Old 7th December 2004, 19:50   #3
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Why are you using both the MUI_ICON define and the Icon command?
You should only use the MUI_ICON define.

All this:
code:
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "C:\Documents and Settings\J0nathan\Desktop\Test!\test.exe"
InstallDir "$WINDIR"
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
ShowInstDetails show

... should be before you insert the Page macro's (after you !include MUI.nsh)

-Stu
Afrow UK is offline   Reply With Quote
Old 7th December 2004, 20:05   #4
jonnebonne
Junior Member
 
Join Date: Nov 2004
Location: Oslo, Norway
Posts: 12
Thanks!
I made it
jonnebonne 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