Skip to content
⌘ NSIS Forum Archive

Scripts no longer work...

7 posts

Tolwyn#

Scripts no longer work...

What is required now for these to work:

!insertmacro MUI_LANGUAGE "English"

breaks my script and:


Section -AdditionalIcons
!insertmacro MUI_STARTMENU_WRITE_BEGIN
; SetShellVarContext all
;Create shortcuts
CreateDirectory "$SMPROGRAMS\$9"
WriteINIStr "$SMPROGRAMS\$9\Home Page Page.url" "InternetShortcut" "URL" "http://www.mysite.com/"
CreateShortCut "$SMPROGRAMS\$9\Uninstall.lnk" "$INSTDIR\uninst_${MUI_PRODUCT}.exe"
!insertmacro MUI_STARTMENU_WRITE_END
SectionEnd
Tolwyn#
This used to work, too, now doesn't. Causes an error on the execution of the installer:

Section "MainGroup" SEC01
SetOverwrite on

File /oname=$INSTDIR\paintschemes\skins\Bf-110G-2\7JG77DH1Bf110G2.bmp ..\..\temp\work\7JG77DH1Bf110G2.bmp
File /oname=$INSTDIR\paintschemes\skins\netchace\-2366628351366167869.bmp ..\..\temp\work\7JG77DH1Bf110G2.bmp
File /oname=$INSTDIR\paintschemes\skins\Bf-110G-2\7JG77DH2Bf110G2.bmp ..\..\temp\work\7JG77DH2Bf110G2.bmp
File /oname=$INSTDIR\paintschemes\skins\netchace\-6082696020110566282.bmp ..\..\temp\work\7JG77DH2Bf110G2.bmp
File /oname=$INSTDIR\paintschemes\skins\Bf-110G-2\7JG77SH2Bf110G2.bmp ..\..\temp\work\7JG77SH2Bf110G2.bmp
File /oname=$INSTDIR\paintschemes\skins\netchace\-3457948107375055752.bmp ..\..\temp\work\7JG77SH2Bf110G2.bmp
File /oname=$INSTDIR\paintschemes\skins\Bf-110G-2\7JG77SH3Bf110C4.bmp ..\..\temp\work\7JG77SH3Bf110C4.bmp
File /oname=$INSTDIR\paintschemes\skins\netchace\2855022606088577029.bmp ..\..\temp\work\7JG77SH3Bf110C4.bmp
File /oname=$INSTDIR\paintschemes\skins\Bf-110G-2\7JG77SM1Bf110G2.bmp ..\..\temp\work\7JG77SM1Bf110G2.bmp
File /oname=$INSTDIR\paintschemes\skins\netchace\-4371902144251491401.bmp ..\..\temp\work\7JG77SM1Bf110G2.bmp
File /oname=$INSTDIR\paintschemes\skins\Bf-110G-2\7JG77SM2Bf110G2.bmp ..\..\temp\work\7JG77SM2Bf110G2.bmp
File /oname=$INSTDIR\paintschemes\skins\netchace\-8310214408202334682.bmp ..\..\temp\work\7JG77SM2Bf110G2.bmp
File /oname=$INSTDIR\paintschemes\skins\Bf-110G-2\7JG77SN1Bf110G2.bmp ..\..\temp\work\7JG77SN1Bf110G2.bmp
File /oname=$INSTDIR\paintschemes\skins\netchace\2184738425766834999.bmp ..\..\temp\work\7JG77SN1Bf110G2.bmp

SectionEnd
Tolwyn#

Error opening file for writing:
"C:\Program Files\UBI Soft\Forgotten Battles\paintschemes\skins\netcache\-2366628351366167869.bmp"
Hit abort... etc.
Do I encapsulate ${INSTDIR} in quotes or just:

file /oname=${INSTDIR}"/path1/path2/somefilename.bmp"
Joost Verburg#
See the Modern UI Readme for the correct order of script elements.

That file write error can be caused by a file that is in use or an invalid filename.
Tolwyn#
The thing I can't figure out is that everything worked before. I haven't changed anything since 2.0 b4 I believe.

Invalid filename according to NSIS?
I can't change valid Win32 filenames to accomodate NSIS.

Forgive my frustration. It takes me days to get a script working and I had a nice template that worked. It's just frustrating to have to continue to change scripts to accomodate new releases. 🙁
Joost Verburg#
As you said, your script worked with a beta version. Beta versions are used to test things and may change.

NSIS uses standard Win32 functions. If it is a valid Win32 filename, it should work. Make sure that the file is not in use, you have admin rights etc.