Bug: installer special but important case

This one I can write up without further research, and while I remember it.

  • Circumstance is when running as an ordinary, not admin user, Windows 10 very latest 1607, but any Windows I think

  • Installer will fail, because it doesn’t ask for admin permission

  • moving to admin privilege under different login won’t work, because Scrivener is tied to login

  • changing to admin privileges in main user (via User Accounts) won’t work now either(!), because the installer has already written something before failing.

  • Scrivener itself is now borked, for the same reason

  • solution is to retain admin privileges, de-install Scrivener, install the available version, then take the upgrade which will soon be offered or can be requested by Check for Upgrades.

  • now all is fine with Scrivener operating, so de-escalate to normal user (User Accounts again), log out, log back in to make it take, and proceed with the definite security advantages against malware takeovers that this provides.

So many other installers do ask up front for a privileged user sign-in, and then work as expected, plus I’ve helped a few others gain this without complaint, so shouldn’t be a big job.

As far as unprivileged user, believe that is actually essential in today’s rather virulent online world (advertising-delivered malware, etc.).

Thanks guys, cheers,

p.s. bug-etteette: About is reporting proper version number, but not release date…

The date is the build date and not the release date, Clive.

Also we have quite some users, who do not have admin rights on their machines. For similar reasons the installer does not ask for admin rights explicitly. You can always elevate your rights, if you have them, and run the installer with admin rights manually. If you are consistent with the account rights that you use to install and update Scrivener, this should not be an issue. Always using Admin rights during install should not hurt, but is also not a must, I believe.

Hopefully your guide, can help users who have cross-used their user rights.

[redacted by self, narrml]

[redacted by self, narrml]

Hi Tiho, and apologies for removed messages - I think late night and crossed languages had me misinterpreting you a little, besides that this is admittedly always a tricky problem. I didn’t say anything so bad either, but can do better, so let’s try :wink:

Then, I’ve always felt software should be adaptive, self-healing. Perhaps my problem scenario began with an old admin-privileged install of Scrivener Windows, then this upgrade attempted without such elevation. It’s a little more complicated, but those are the likely bare bones.

From what you say it’s likely you handle the non-elevated install and upgrades smoothly, probably by installing to one of the non-privilege-requiring AppData areas, as this seems a common method.

To help where people have changed their habits similarly, or had them changed by management, I think you could cover the scene by trying a test write to the install folder before anything else is done, then failing the install with a friendly message suggesting what to do if the write can’t happen, also so that no half-install happens.

What should a person in such situation be guided to do? I think a full deinstall is the first thing, which they can either do by assuming an administrative login, or by their IT people doing it for them. Once out, then Scrivener can go in from their non-elevated login, and all updates the same.

Much simpler than the way I untangled, and very possibly in the morning I’ll do just this here, mention that it works. Then it should be easy for you to help adapt in this direction, sound good?

Sleep now, and regards,

Ok, and it only took a ‘as usual stretched’ ten minutes to try the above, and find it worked well.

Scrivener is now installed and normally upgraded without needing privileges, and functions as before, including tests both ways of syncing with an iPad. I even checked the one thing that concerned me, one of those leaps we have, whether elevated Scrivener would have left around anything effectively locked in the Recent Documents list. But no, this was fine, both previously contained titles and new ones.

So, very good. The one thing I noticed is that you are installing in this case to an unusual place, under Documents in a Scrivener folder. I don’t personally mind this, but might think it better to do as apparently is customary for the unprivileged case, install to the hidden Users/user/AppData/Local area also with a Scrivener folder. You can see what you think.

Here’s a StackExchange which is pretty straightforward about this, including the knowledge that Google does it, for Chrome for example. There are of course dissenting voices with ‘‘shoulds’’, but I think you know why you want this freedom. There’s also note of what is actually advantage, that the user identity’s installs will follow them in some Microsoft scenarios.


Another point made elsewhere is that the installer can ask whether the program is to be installed for the current user or ‘for everyone’. As you might imagine, ‘everyone’ means elevated privilege required, which gives you the nice breakpoint where you can pre-test for this. On the updater you have to do the pretest, as above, to avoid the current difficulties possible, at least seems so.

Ok, Tiho, good mood here listening to one of those quiet later Mark Knopfler albums, and definitely ready for the week’s rest.

Take care, and thanks again for all the excellent work – and that we know is coming.


Thanks for testing this Clive and your tests gave positive results. About using Users/user/AppData/Local have in mind that this folder is not available under XP, if I remember correctly. Supporting all flavors of Windows with Admin/Non-Admin rights etc. is not an easy task, and the installer seem to handle it correctly for now.

Asking the user to install Scrivener for all users, or the current user will cause problems with licensing management. Because of this it is installed by default for the current user only. Multiple users will need to license separately, which is not a problem as Scrivener supports limited in number, but multiple usage with the same license.

Still glad that it all worked correctly in your tests. Enjoy the weekend, Clive!

Hi Tiho,

Yes, I thought of that XP problem this morning, and you will realize that while I’ve got ‘a little’ background, Windows dev was never part of it, nor do I think in terms of global userbases automatically these days. The licensing by userid problem also floated up, and so I’m thinking that your approach of installing to userid/Documents is an interesting and likely wise one.

I do think to remind the request that the installer actually check to see if it has permissions and request if not, before doing any writing.

This is entirely current practice, and works very well whether a user can grant elevated permissions through password to another login or not. If not, or if s/he can’t get the password right, the install just backs out.

This would cover all scenarios, plus the important reason I wrote the bug in the first place: that currently, something is written before insufficient permissions are discovered (possibly to the registry?). In any case, once that happens, you can’t install or upgrade Scrivener at all, until you fully uninstall it (and I ditched the Program Files 86 folder for it also, just to be safe).

I think you’d want that problem gone, and the easy way is to do the standard thing, requesting elevated permissions if needed. You can see what you think…!

Best, and a nice weekend there, where I imaigine you winter-surfing, if in same lands as Lee,

Indeed the installer does check the current user permissions before installing anything. What it does not do, is ask you to elevate your own permissions to Admin, if you run it as a regular user. This might confuse users who do not have Admin rights on their machines, and might actually make them think that they cannot install Scrivener. As Admin rights are not needed in normal circumstances, there is no need to ask for these. We will discuss this further with the support team and check, if anything can be done to improve the current state. Thanks again, Clive!

Indeed I am summer surfing(indeed summer kite-surfing), as I am not in the same land as Lee. :wink:

Sounds good, Tiho, and great to get the team involved for a reading.

It occurred to me that this problem only occurs when Scrivener was originally installed with admin privileges, then an update is attempted without them. In this case I don’t think you are going to confuse anyone by putting up a necessary message that they would need the privileges – since this is Scrivener, you could even briefly say why (because of the original installation).

Also, the step of asking to gain privileges through password of an admin user login if present is very common now, so that shouldn’t be off-putting, especially with the friendly explanation.

The main thing I think is never to proceed with any action, until you know if you need and can get elevation. I think it did that, if it wasn’t something else that happened, which locked me out of Scrivener working, or any reinstall remedies, until I completely removed the current installation.

Always a pleasure to find someone as thoughtful, Tiho, and with good cheer :wink:

Best thoughts,

Ha :wink: So now I am left to be wondering, are we talking of Monterey Bay, or the Gulf of Ostrobothnia???

Take care, Tiho, man of mystery, and cheers :wink:

Betting is now open on how many more rounds of “But…[new way to explain the same request]”/“No” we the forum readers are going to be treated to.

Well, you know and in truth, devinganger (tempting my Deutsch), it’s kind of a Yogi Berra situation…

i.e., ‘It’s hard to communicate, when you’re trying to get on a wavelength with someone…’

The thing is so often with languages, which are begotten of cultures, and cultures can be mixes of nationality, peer group, and so forth.

More than half an adult life in differentiated countries will bring you to appreciate such, and that’s what’s been going on here.

Besides enjoying the surfboarding, having surely been young for a long time, once, if not yet ongoing :wink:

Kind regards,