How to change NSIS Error message about CRCCheck - nsis

Some of my users are complaining about some odd errors my installers had after downloading them from my web server.
This are NSIS installer that when downloaded came crippled or incomplete (usually because of slow Internet connections), the message is very clear "The installer you are trying to use is corrupted or incomplete....." IN ENGLISH!! (Did I mention my users only speak Spanish?).
How do I change the language or create custom error messages?
I already create the installer in Spanish by using:
; Language files
!insertmacro MUI_LANGUAGE "Spanish"
Any Idea?

The CRC check runs before you/nsis can access the langstrings, so the only way to change this message is to recompile the source code.
The message was changed several versions ago and now includes a URL to the NSIS wiki, one would think your users would be able to run a translator on that page

I haven't done an NSIS package since it was referred to as Super Pimp (great name). See if this helps:
NSIS Language Table

Related

Node.js installation (windows installer) terminates prematurely on windows 10 64-bit

After going through a windows 10 re-installation due to a windows update crashing my laptop, I was left with re-installing many applications. One of them being node.js. When I tried to install it through the windows installer, I kept getting 'setup wizard ended prematurely because of an error message'. I am not sure what the problem is. I used x64 version which is what my OS is and there is no nodejs folder in program files. When I logged the installation this message popped in a lot of the lines has no eligible binary patches. Before the no eligible lines there were error logs such as:
'WixSchedInternetShortcuts: Error 0x8007000d: failed to add temporary row, dberr: 1, err: Directory_'
'WixSchedInternetShortcuts: Folder 'ApplicationProgramsFolder' already exists in the CreateFolder table; the above error is harmless'
If that is not enough information please advice me on how to send the full logs without spamming huge text in the thread. Thank you.
The MSI log file:
https://gist.github.com/luki2000/ab00476127d54aaf610d8bda84d40a64
Maybe try to search the log for "value 3" as explained by Rob Mensching in his blog. Doing so will find the locations in the log file that describe errors of significance.
Many people use dropbox, gdisk or similar to post logs. Some put it on github (just a sample log for OP, leaving in for reference). Check that last link, is that the same problem you see perhaps? (search for "value 3" as explained above - without the quotes of course). Looks like there is an error creating an Internet shortcut. Perhaps that is a Windows 10 problem? I will take a quick look.
I am betting Bob Arnson knows what this problem is outright. He will probably give us the real answer, see below for my workaround.
The correct thing to do overall, would probably be to communicate the problem back to the Node.js guys so they can fix the problem once and for all.
UPDATE: Maybe see if this answer helps you: node.js installer failing with 'CAQuietExec Failed' and 1603 error code on Windows 7. Essentially un-check Event tracing(ETW) in the setup's feature dialog - or you can try to launch the MSI from an elevated command prompt.
UPDATE: There seem to be two Internet shortcuts configured for this MSI in the WixInternetShortcut table. I would just create a transform to remove these two shortcuts and try a reinstall. If you feel bold and fearless and like to break the law, you can delete the two rows from the table and just save directly to the MSI itself. This is never the right thing to do if you are a deployment specialists. The original MSI is sacred, but if this is for your own system and you need to get something done, that would work. Then you just install the MSI direct afterwards. Otherwise you can install the transform after creating it with a simple command line:
msiexec.exe /i node-v8.11.2-x64.msi TRANSFORMS="C:\MyTransform"
You can create the transform using Orca, InstEd or SuperOrca or any commercial tool that supports creating transforms.
In case you don't know, transforms are little database fragments that are applied to the original MSI (which is also a database under the hood). After the transform is applied the in-memory version of the MSI is the MSI + the changes from the transform.

How to run something just before the files are installed?

I would like to know how to run something just before files are installed using NSIS.
I know about the .onInit function. That function runs when the installer is first starting. That is not what I want. I would like to run something after the user has clicked the install button but before the files actually get installed.
To be more specific. I have a windows service. When the installer is upgrading the windows service, I need it to stop the service - but only once the user is committed to the install - not when first starting the installer. Then it can upgrade the files and finally (re)start the service again. This seems like it should be a common requirement, but I haven't been able to find anything.
If it matters I'm using the MUI instead of classic.
All sections are executed on the instfiles page and they are executed in the same order as your source .nsi so you can just add another (hidden) section:
Section
# Do service stuff...
SectionEnd
Section "Required Files"
File xyz.abc
SectionEnd
Section
# Do service stuff...
SectionEnd
As Anders said - create invisible (hidden) section which is very first of all sections in your script and stop the service there.
When the other sections will be executed the service will be stopped.
Tip: maybe you should wait few seconds to let service manager time to stop the service.

nsis script flaged as trojan by avira

My nsis script is flagged as a trojan "tr/kdv.hg.1" when I reconfigure my nsis script to do some parts of the script there is no problem.
But the script all together gives the false positive. Does anybody now which functions of nsis are likely causing this?
NSISdl, INetC and Dialer are the most common triggers AFAIK. Submit a sample here to get it fixed...
There is an old thread about Avira on the forum.

Can SCCM deploy a VSTO add-in without using an MSI wrapper

Does anyone know if I NEED To wrap my Office 2007, vsto-based add-in in a MSI? It seems to be a lot of extra overhead and headache, just to have it not work anyway.
When I do get it to install, I still need to run the vsto installer, even though I have tried to use the |vstolocal switch to keep the add-in's deployment centralized.
Has anyone pulled this kind of install off successfully?
I've deployed VSTO from SCCM without using an MSI.
The trick is a simple command line:
"%commonprogramfiles%/microsoft shared/VSTO/10.0/VSTOInstaller.exe" /i <path to vsto>
VSTOInstaller.exe [[/install ] | [/uninstall ]] [/silent]
[/help]
/install, /i: Install the solution. This option must be followed by
the fully qualified path of a deployment manifest in the form http://,
https://, or \servername\foldername.
/uninstall, /u: Uninstall the solution. This option must be followed
by the fully qualified path of a deployment manifest in the form
http://, https://, or \servername\foldername.
/silent, /s: Install or uninstall without prompting for input or
providing information.
/help, /?: Generate this help message.
EXAMPLE: VSTOInstaller.exe /i \servername\foldername\AddIn.vsto
Be aware that with the /silent option "trust for the addin has to be built into the project or it will default to 'don't install' when using the silent switch." (source: TechNet post)
I've tried it, and you don't need to wrap it in an MSI if you're happy for users to manually install it. If you:
use the publish tab in project -> properties
setup your "publishing folder location" and "installation folder URL" properly
set and all of the other meta-data properly, including stuff in your AssemblyInfo.cs file
whack the "publish now" button
share out the installation folder and email out the link
ensure that users have the right permissions to install it (local admin I guess, you'd need to check)
It worked for me. On Windows 7 and XP too.
The whole "this publisher is untrusted" thing is a complete mess, trying to fix that involves writing some really stupid code that tells Windows that "hey, by the way, I am actually trusted". I didn't bother and just told people to ignore the warning.
I'm guessing that you only need an MSI if you want to push out the add-in using active directory and do an automated install.

The type or namespace name 'Script' does not exist in the namespace 'System.Web'

I just deployed a website into IIS 7 (about which I am woefully ignorant), and upon trying to build the site, I receive this error. I did a little googleing and I saw an article that said I should put system.web.extensions.dll into the /bin. But, I also saw an article saying not to do that. I tried it anyway, but I just received a different error ('Resource cannot be found').
I am totally clueless as to what else to try
Can you use the "Publish" command in Visual Studio to publish directly to the site? If not, then use that command to publish to a similar site on your machine, then copy it to the customer site.
You should also look into the IIS Web Deployment Tool. It can copy an entire site, including IIS settings and any databases. It will be built into VS2010.
Go to control panel, then programs, turn windows features on or off, scroll down to Microsoft.net framework 3.5.1 expand, make sure both sub options are selected, this might help your issue.

Resources