Sumatra PDF is a PDF, ePub, MOBI, CHM, XPS, DjVu, CBZ, CBR reader for Windows

Silent installation does not work

For years the silent installation of Sumatra EXE installer 3.1.2 was working well via WSUS Package Publisher. But it does not with V 3.2.
First, the parameters listed in the documentation and the online version with -help differ. The doc says “-s” and the online help “/s”. But both do not work as expected.
If I start the installer with /s or -s it tells me that I have to use the parameter -install to install it. This is undocumented and was not needed to install 3.1.2 - with this I used -s -opt -register and everything went well.
Ok, now I use .exe -install -s and the installer still wants to know if I am really sure to install the 32bit version on a 64bit-system. Yes I am and this is not what I expect when I want to install silently.
And this is IMHO the reason why the silent installation with WPP fails. The small window with the question is suppressed and so the installation starts but never ends.

Is it possible to remove the question window when I try to install the 32bit version on a 64bit system?

1 Like

Hi
There are many re-iterations of installer issues and significant discussion about 32/64 bit installation which resulted in the very late addition of “warning” are you sure you want to go against the grain. see https://github.com/sumatrapdfreader/sumatrapdf/issues/1250 It may help the developers understanding, to explain why.

I agree silent should be silent since you must have a reason @kjk ?

The -install requirement is a need for the filename as downloaded to self identify itself
if you change the name then again an extra option is required

1 Like

I had the same “x64 on x32” problem when calling the 64-bit installer from a 32-bit shell, TotalCommander in my case. The default setup installs the software to “%Userprofile%\AppData\Local\SumatraPDF”. This is inconvenient. Starting the installation script from the native Windows cmd prompt workes fine with the new /s /d “%ProgramFiles%\SumatraPDF” parameters.

1 Like

Agree completely that silent install switch should suppress that dialog. Presumably anyone using these switches and installing from the command line knows what they’re doing.

@kjk: This is indeed coming as a surprise to folks who expect the program to end up in Program Files. Also, I recall we discussed that the hidden options in the installer should be unhidden and displayed by default. This will reduce all such queries regarding why the program’s ending up in %LocalAppData%, why Explorer preview doesn’t work and so on.

I suppose it should be trivial to modify the installer to unhide the ‘advanced’ options (and silence the 32 on 64-bit dialog with the silent switch), so maybe that can be done with the current 3.2 installers since a wave of new installs is on its way?

1 Like

@magl8 can you double-check that it wasn’t 32-bit installer? The 64-bit installer has -64 in file name (SumatraPDF-3.2-64-install.exe).

I tried to reproduce this by double-clicking on 64-bit installer from 32-bit version of Total Commander and I didn’t get the warning, as expected.

/s and -s are the same thing (that applies to all options).
I will normalize the docs to use -.

I’ve fixed the -s to not show this message. It was a bug.

I need to make a new minor release with the fix but I’ll wait a bit to see if there are other things that need to be fixed as well.

1 Like

Just to confirm (versions after 3.2)

The correct sequence to install e.g. to Program Files is to keep -install in the filename and runas admin
The usual caveats apply e.g. do NOT overwrite without uninstalling previous version and first back-up any user customization / preferences inc. SumatraPDF-settings.txt

SumatraPDF makes a number of registry tests and self checks during installation including an attempt to preserve user settings, However, those can sometimes be thwarted.

For 64 bit (you will need to adjust for 32bit)

>SumatraPDF-64-install.exe  -s
OR
>SumatraPDF-64-install.exe -d "C:\Program Files\SumatraPDF" -s

Place an all user shortcut in C:\Users\Public\Desktop

To Uninstall by ELEVATED admin command line

>"%localappdata%\SumatraPDF\Sumatrapdf.exe" -uninstall -s
OR
>"C:\Program Files\SumatraPDF\Sumatrapdf.exe" -uninstall -s

Remove any shortcut in C:\Users\Public\Desktop
Same caveat back-up any user customization and preferences inc. SumatraPDF-settings.txt

kjk, thanks, it helped.