Getdown on windows (UAC)

293 views
Skip to first unread message

zarch....@googlemail.com

unread,
Jan 15, 2013, 1:24:32 PM1/15/13
to ooo-...@googlegroups.com
Hi all,

Sorry if this is covered somewhere but I'm having a nightmare day and cannot find anything useful.

I've got getdown, sorted out my project, got it all downloading and looking great.

"Excellent" thinks I.

I wrap getdown into launch4j.

Still works perfectly.

I install the wrapped getdown into program files using an MSI installer.

When I run getdown it says "Multiple instances of this application's installer are running.  This one will stop and let another complete"

Now I did a little more closely and it seems that getdown always tries to write to a lock file in the install folder. That fails since you don't have admin access and then this entirely misleading error appears.

If you run as administrator that works but:
1. You have to run as administrator, if you run as normal and then fail to get access you don't then try and escalate the priviledges - it just fails
2. You always have to run as administrator, even if no actual changes need making.


Surely this can't be the first time anyone has tried to install getdown into the correct place on a windows computer? I had a quick test looking at puzzle pirates and that seems to install into my user AppData folder :o

Thanks,
Tim

Michael Bayne

unread,
Jan 15, 2013, 1:49:24 PM1/15/13
to ooo-...@googlegroups.com
On Tue, Jan 15, 2013 at 10:24 AM, <zarch....@googlemail.com> wrote:
Surely this can't be the first time anyone has tried to install getdown into the correct place on a windows computer? I had a quick test looking at puzzle pirates and that seems to install into my user AppData folder :o

Your definition of "correct" is not our definition of correct. For us correct means, a user can install the game and it just works. 

If you try to locate a Getdown app in a place where only Administrators can write files, you're going to only be able to install or update the game as an Administrator. That's a non-starter for our commercial products and probably most other commercial products. I don't know why you want to install files in a place where only Administrators can write, but if that's an essential requirement, then Getdown is not going to work for you.

-- m...@samskivert.com

Tim Boura

unread,
Jan 16, 2013, 4:30:49 AM1/16/13
to ooo-...@googlegroups.com
Ack, I tried to make a reply but it sent it as a private message and now I can't find a "sent" anywhere to post it as a proper reply :(

I don't want to seem rude as I think getdown is a fantastic library...except...

My definition of "correct" is the same as everyone elses. Programs on windows are installed to C:\Program Files\ or a variant thereof. A popup requesting admin access is displayed when they are installed and updated but to just run them no admin access is required. This is how every single piece of commercial (or 99.9% of non commercial for that matter) software I have ever installed has worked.

Save files, temporary files, etc go into AppData. The software itself goes into program files.

It's an important security improvement that was made starting with vista and present in all version of windows since...

makkus

unread,
Jan 16, 2013, 4:52:07 PM1/16/13
to ooo-...@googlegroups.com
Hey,

I was having the same problem, not being able to deploy my getdown-based app as "native" windows application. However, I don't think it's getdowns' responsibility to provide that kind of functionality. Most windows applications I know don't update as often as my getdown-based one and they require elevated privileges to do that. I wouldn't want that kind of behaviour for my applications.
That being said and after having had a look at the source code, I'd guess it would be easy enough to add an option to download the payload somewhere into the users directory. So you could just do that.

Or do as I did and write a couple of wrapper scripts. Feel free to use mine as inspiration:

https://github.com/nesi/nesi-tools-installers

especially the .bat files in:
https://github.com/nesi/nesi-tools-installers/tree/master/scripts/windows

I've also got a couple of .vbs scripts that make away with the ugly commandline windows that would otherwise appear if started via a shortcut. You might not need those if using launch4j. launch4j was too restrictive for my taste, so I didn't use it.

Anyway, I'm doing the same to deploy a "native" Mac OS X application package, it's in the same repo if you are interested.

Cheers,
Markus

Tim Boura

unread,
Jan 16, 2013, 6:00:53 PM1/16/13
to ooo-...@googlegroups.com
Thanks a lot Makkus, that sounds very helpful. I'll have a proper look through them tomorrow and see where I get to.

At the moment my choices seem to be ripping out getdown, patching getdown to use the data folder for the lock files (so only the real data goes into program files...and even then I'd need to elevate the priviledges somehow when a real update was detected as needed), or installing to app data.


makkus

unread,
Jan 17, 2013, 3:34:07 PM1/17/13
to ooo-...@googlegroups.com
Yeah, the one disadvantage of the way I'm doing it is that if multiple users use the application, the main jar(s) (and associated resources) get downloaded for every user. I decided that I don't really care. Bandwidth and storage space is cheap (especially other peoples :-) ), my time to figure out something more frugal is not :-)

I guess there must be some 'shared appdata' directory in Windows which could be used instead of the users' home directory, but then there might be other problems with permissions and such. Tell me how you go, I was thinking of putting together some sort of distribution that wraps up how I use getdown plus the installers for Mac & Windows (and a cross-platform one using IzPack) so one can just put in ones' jar file and get out 3 installers...

Cheers,
Markus

Tim Boura

unread,
Jan 18, 2013, 4:10:12 AM1/18/13
to ooo-...@googlegroups.com
I wrapped getdown in an exe using launch4j. I then created an Inno Setup installer that creates the install folder in {userappadata} and then adds the start menu shortcuts for website/start game/etc to just run that exe. Getdown then installs and runs the application to there. It's far from optimal in that users can no longer select their install location and it cannot install to the windows standard locations but it is about as good as we are going to get without substantial investments of time that I just don't have at the moment. I also setup the uninstaller to delete all the stuff getdown grabs as well, so it's a full uninstall.

I've put together the basics for the linux and mac versions as well - just starting to test them now. For linux I've just done a shell script to launch getdown and put everything into a zip. In theory unpack zip then launch the shell script is all that's needed - although it's not working quite right yet.

For mac I'm packing everything together in a zip as well with an info.plist etc. Not even started testing that yet though.
Reply all
Reply to author
Forward
0 new messages