The Widelands installer should ask for admin privileges when installed into C:\Programs

Bug #1630110 reported by Kyromaster on 2016-10-04
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
widelands
Undecided
Unassigned

Bug Description

I installed the appveyor generated build 1228 on my computer.
However when starting it I see "the application has requested the Runtime to terminate in an unusual way".
I tried both debug and release builds but I get the same message.
I've a Lenovo MIIX 300 Netbook with Windows 10 x32 and an Intel HD Graphics (Bay Trail).
What can I do to help debugging?

Related branches

SirVer (sirver) wrote :

Thanks for reporting this!

Which OS is this?

I assume this is a duplication of https://bugs.launchpad.net/widelands/+bug/1536377 which remains a mystery for the moment.

Next to widelands.exe should be the output of the whole program (called stdout.txt IIRC). Could you look at its contents? Also, starting widelands from the cmd.exe prompt will give you more information.

Changed in widelands:
status: New → Incomplete
Kyromaster (kyromaster) wrote :

I use windows 10
I figured it out: it's related to administrator privilegies
Running widelands.exe as administrator and it works. But no idea why it requires admin rights...

SirVer (sirver) wrote :

does this also happen with tinos nightlies?
https://widelands.8-schuss.de/

Kyromaster (kyromaster) wrote :

I can't test since these are x64 and I'm on x86

Tino (tino79) wrote :

This is a known restriction:
Widelands does not need administrator privilegies and so the installer does not ask for them and suggests an installation dir which does not require elevated rights.

If you explicitely start the installer with elevated rights and install to a restricted path (e.g. c:\Program Files) you also need to run widelands with elevated rights because it writes a logfile at runtime to the same dir as the executable resides in.

Kyromaster (kyromaster) wrote :

This isn't true with my system.
It wants to install into "C:\Programme\Widelands" which is IMHO the right place for programs.

Tino (tino79) on 2016-10-04
Changed in widelands:
status: Incomplete → Confirmed
milestone: none → build20-rc1
Tino (tino79) wrote :

You are partly right. This is the correct dir to install programs, but not to write data at runtime to.
What widelands does at moment (the logfile).

I do want to enable users with no admin rights to be able to install and play widelands, so I won't hardcode asking for privileges into the installer.

But for B20 we should do:
- Ask for admin privileges if the user chooses a dir which requires those (but only then)
- Do not write the logfile to wl binary dir (This should go to %USERHOME%\.widelands)

Kyromaster (kyromaster) wrote :

This is exactly what I wanted to suppose as a solution ;)
Perhaps even better under windows would be to store all application data to %userhome%\AppData\...

GunChleoc (gunchleoc) on 2016-11-01
tags: added: windows
GunChleoc (gunchleoc) on 2018-07-15
summary: - Widelands crashes on startup
+ Widelands crashes on startup when installed into C:\Programs
GunChleoc (gunchleoc) on 2018-09-06
Changed in widelands:
assignee: nobody → GunChleoc (gunchleoc)
status: Confirmed → In Progress

I have tested the AppVeyor release build for the attached branch on Windows 10. The installer had to be run as administrator when installed into C:\Program Files, the game can then be run without admin privileges. stdout.txt is written to C:\Users\<username>\.widelands

Also, the uninstaller can remove the Widelands directory cleanly now, because there is no new file written into it.

Changed in widelands:
assignee: GunChleoc (gunchleoc) → Tino (tino79)
status: In Progress → Triaged
summary: - Widelands crashes on startup when installed into C:\Programs
+ The Widelands installer should ask for admin privileges when installed
+ into C:\Programs
Tino (tino79) on 2018-09-18
Changed in widelands:
status: Triaged → Fix Committed
assignee: Tino (tino79) → nobody
Tino (tino79) wrote :

Innosetup does not provide a way dynamically asking for admin priviliges when the user chooses a protected installation dir (e.g. C:\Program Files).

I have no switched to {localappdata}\Widelands as default dir, which is guaranteed to be user writable.

If the user does want to install to protected dir, he has to start the installer manually as admin.

GunChleoc (gunchleoc) wrote :

Fixed in build20-rc1

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers