Install under any other name…



  • @Gaska said:

    On the other hand, they still have 90% market share in desktops.

    Maybe, but is the desktop that much relevant ?



  • Remember, we're talking about users here: "What's a right-click? I just wanna run Putt Putt Meets Grumpy Cat like I did back on my old computer, and all I had to do there was double-press Setup. The computer before was much nicer: pop in the disk and there it was. {soul destroying reminiscing about Winders 95}"

    It's better to interrupt the user to ask for elevation, as part of their workflow, and have it turn out successfully, than to have them finish the workflow and fail and then magically expect them to start another workflow a special way they may not know about.


  • Discourse touched me in a no-no place

    @TimeBandit said:

    And right-click -> Run As Administrator is too hard ?

    Speaking as someone who regularly helps my clients install software, I would say yes.



  • @TimeBandit said:

    And if the user click "No", what happen ?

    I would imagine the application doesn't run. Your point?



  • @TimeBandit said:

    And right-click -> Run As Administrator is too hard ?

    Something like 60% of users do not know what right-click does, and some people aren't even aware such a thing exists. Not even to mention computers with pointing devices like, say, touchscreens.

    So yes, it is too hard.



  • @Kian said:

    I would imagine the application doesn't run. Your point?

    In that case, if your program is named setup.exe, the only way to make it work is in elevated privileges mode.

    Would have probably been better to just ask the user if it is an installer or not.



  • @blakeyrat said:

    Something like 60% of users do not know what right-click does, and some people aren't even aware such a thing exists.

    You are pulling those stats from your ass ?

    To quote you : Proof or you're full of shit.


  • Banned

    @blakeyrat said:

    Something like 60% of users do not know what right-click does, and some people aren't even aware such a thing exists.

    I expected this number to be much, much bigger. Now, let's put away Apple and talk about Windows users.



  • @TimeBandit said:

    In that case, if your program is named setup.exe, the only way to make it work is in elevated privileges mode.
    So rename the application. Why is it so critical that your not-an-installer be called setup, AND not run in elevated mode?

    Would have probably been better to just ask the user if it is an installer or not.
    How is the user supposed to know if an application needs elevated access? It's called setup, that hints that it is an installer.


  • @Kian said:

    How is the user supposed to know if an application needs elevated access?

    The user should know if he's trying to install something or just running an already installed program.
    Or, maybe he's too dumb to use a computer.



  • You're the one advocating for a setup executable that doesn't behave like an installer. You are the one supposed to explain what the hell this setup.exe is doing that doesn't need elevated privileges.


  • Banned

    You'd be surprised how many people who use computers for living are actually too dumb to use them, and only by a miracle and decades of MS devs' expertise in idiot-proof design they still haven't blown up anything this week.



  • This thread is about an exe that was named install_hello.exe and didn't work because Windows insist on using it as an installer.

    I'm just pointing the stupidity in making an exe not work because it's got "install" in its name.



  • This post is deleted!

  • Discourse touched me in a no-no place

    @TimeBandit said:

    I'm just pointing the stupidity in making an exe not work because it's got "install" in its name.

    I CBA to check, but the "might not have worked" usually means "didn't put anything in the registry regarding uninstall." So the question is, did OP allow the program to run, and then click "this program terminated normally".

    My company's application does just what happens in the OP. One of the many things I'd love to do is fix it so you don't get the "might not have run properly", but I am forbidden from touching the installer because it's fragile and they're afraid I'll break it.



  • @David_C said:

    Maybe I want to install it privately (e.g. somewhere under my home directory) and it doesn't require administrative access. Why should I need to go through UAC (and possibly have to type in an admin password) simply because of the filename?

    Just rename it...? (Assuming you know about this nuance)

    Installing something in your home directory instead of for all users isn't something normal "users" do anyway.



  • @Steve_The_Cynic said:

    GetVersion returns (minorVersion << 8)|majorVersion

    I doubt that this is the actual implementation. My guess is that in very early versions of Windows, the version was a struct of two bytes: major version and minor version. When this is returned as a WORD the values get reversed because of Intel little-endianess. I can't find any documentation to verify this, however.



  • @David_C said:

    I'd like to think so, but according to comments in the "old new thing" article, the filename (or strings scraped from inside the application's resources) appears to override the manifest. Unless your manifest has some new magic to disable the "program compatibility assistant" which always thinks it knows better than the application developer

    It seems that you need further special handling for it to work
    @Comment of Mark in the linked The Old New Thing article said:
    @AndyC: "An embedded manifest will always override AppCompat shims."

    I'm not sure if this will solve nik's problem, but in Windows 7 you may need a new section in your manifest to override the Program Compatibility Assistant.

    msdn.microsoft.com/.../dd371711(VS.85).aspx

    blogs.msdn.com/.../pca-changes-for-windows-7-how-to-tell-us-you-are-not-an-installer-take-2-because-we-changed-the-rules-on-you.aspx



  • @cheong said:

    It seems that you need further special handling for it to work
    @Comment of Mark in the linked The Old New Thing article said:
    @AndyC: "An embedded manifest will always override AppCompat shims."

    I'm not sure if this will solve nik's problem, but in Windows 7 you may need a new section in your manifest to override the Program Compatibility Assistant. ...

    Yes. I know. I even linked to those two articles immediately following the text you quoted.



  • Out of interest, is py2exe doing the correct thing here? It sounds like the weird behavior is only triggered when windows can't find a manifest, so shouldn't py2exe be embedding a manifest? Seems a bit shit to complain about the os making its best guess about missing information when you've neglected to provide that information.


  • Dupa

    @David_C said:

    The Linux world does the same thing, especially in the kernel

    I thought Linus said that "we don't break user space you fucking dumb shit". Was "without a reason" missing there?


  • Banned

    @Buddy said:

    Out of interest, is py2exe doing the correct thing here?

    It's hosted on SourceForge.



  • @PleegWat said:

    This program may need escalated privilege to continue

    And you click "yes", and the whole install process starts from the very beginning because you can't elevate a process mid-run. Or you click "no" and get a half-installed program.


  • Banned

    I wonder why no one at Microsoft thought of triggering UAC for non-manifesting files only if there is an action requiring priviledge.



  • @Gaska said:

    only if there is an action requiring priviledge.

    Because you'd need to restart the whole installer once it gets to the "actually do shit" stage and lose all the input?


  • Banned

    Pausing a process is a thing, you know.



  • Yes, but elevating it mid-run isn't. Unless your application does its work in worker processes that can be restarted without restarting the whole app, but then it's probably because it's UAC aware anyway.



  • @TimeBandit said:

    @blakeyrat said:
    The user wants to run the Setup.exe file. Elevation is the only way for that file to run successfully.

    And right-click -> Run As Administrator is too hard ?

    And what in the Windows UI makes it obvious that [code]right-click -> Run As Administrator[/code] even exists?

    Sure, you know about it. I know about it. But I guarantee that there are lots of people who have absolutely no idea that such a thing exists.


  • Banned

    I see at least one thing Windows developers can work around Windows not being able to elevate priviledges mid-run.



  • @Gaska said:

    I see at least one thing Windows developers can work around Windows not being able to elevate priviledges mid-run.

    And how, pray tell, would an author of an installer written in the Windows XP era know how, or to, work around the elevation mechanism when the mechanism wasn't invented yet?


  • Banned

    @Spanky587 said:

    And what in the Windows UI makes it obvious that

    right-click -> Run As Administrator

    even exists?


    Accidental discovery. Just like literally every other cool thing computers can do. You find out about Ctrl+C/Ctrl+V either by accident, or by someone telling you about it. Same with Snipping Tool. Same with hibernation in XP. Same with multimedia keys on fancy keyboards. Same with two-finger scrolling on touchpad. Same with moving window around with arrow keys. Same with "go to location" in shortcut's context menu. Same with how to exit vi. Same with landscape mode in phones. And so on and so on.


  • Banned

    @Maciejasjmj said:

    And how, pray tell, would an author of an installer written in the Windows XP era know how, or to, work around the elevation mechanism when the mechanism wasn't invented yet?

    Windows 7 developers didn't live in Windows XP era. And even if, they could change how things work in Windows - that's what they're paid for, after all!

    For the record, by Windows developers, I mean the developers of Windows.



  • Any reason they had as to why you can't elevate a running process is also a reason as to why doing it specifically for a compat shim is bad.

    And I suppose the design decision behind the inability to elevate a running process wasn't just "eh, fuck it, we can't be arsed to figure out how that would work".


  • Banned

    @Maciejasjmj said:

    Any reason they had as to why you can't elevate a running process is also a reason as to why doing it specifically for a compat shim is bad.

    Do they have a reason at all?

    @Maciejasjmj said:

    And I suppose the design decision behind the inability to elevate a running process wasn't just "eh, fuck it, we can't be arsed to figure out how that would work".

    I think quite the opposite. But that's just blind guessing on both sides; we'd need to ask someone who was there when the decision was being made.



  • @Gaska said:

    @Spanky587 said:
    And what in the Windows UI makes it obvious that

    right-click -> Run As Administrator

    even exists?


    Accidental discovery. Just like literally every other cool thing computers can do. You find out about Ctrl+C/Ctrl+V either by accident, or by someone telling you about it. Same with Snipping Tool. Same with hibernation in XP. Same with multimedia keys on fancy keyboards. Same with two-finger scrolling on touchpad. Same with moving window around with arrow keys. Same with "go to location" in shortcut's context menu. Same with how to exit vi. Same with landscape mode in phones. And so on and so on.

    You have greatly under estimated the number of people who have zero interest in learning anything. The only thing they care about is "I need to [do something] show me what button to push."

    The idea of just exploring, trying things and figuring things out, literally never enters their mind.



  • @kt_ said:

    @David_C said:
    The Linux world does the same thing, especially in the kernel

    I thought Linus said that "we don't break user space you fucking dumb shit". Was "without a reason" missing there?

    User space is not in the kernel. Code running in the kernel is sometimes broken by kernel changes. There are best common practices to minimize the amount of breakage, but it happens.

    And he was talking about documented APIs. Undocumented/internal stuff is not set in stone. If your app needs to use something undocumented, it may (and sometimes does) break. If you're doing this in a published application, then you're going to have to deal with the fallout of such a design decision.


  • Banned

    @Spanky587 said:

    You have greatly under estimated the number of people who have zero interest in learning anything.

    No I didn't. I know many people who don't realize there's a keyboard shortcut for copying.

    @Spanky587 said:

    The idea of just exploring, trying things and figuring things out, literally never enters their mind.

    When I said accidental, I literally meant accidental. They don't realize something exists, they do something stupid, and then they're either like "oh shit! What have I done! Never again" or "oh shit! What have I done! ...Wait, that's actually quite cool". That's exactly how I discovered detachable tabs in Chrome 2 and Ctrl+Arrow text navigation.


  • FoxDev

    @Gaska said:

    No I didn't. I know many people who don't realize there's a keyboard shortcut for copying.

    if i had a nickle for every time i blew someone's mind using keyboard shortcuts instead of the mouse...

    i estimate i could buy a ferrari outright with the cash.

    not a new one, it would have to be used, but still!


  • Discourse touched me in a no-no place

    @Gaska said:

    Accidental discovery.

    Of course, if you work for a place that makes user accounts non-Admin by default, you can't.


  • Discourse touched me in a no-no place

    @Maciejasjmj said:

    And I suppose the design decision behind the inability to elevate a running process wasn't just "eh, fuck it, we can't be arsed to figure out how that would work".

    Given that elevation will cause an application to restart as a different user, all the obvious things come into play, like "mapped drives won't exist" and "security will probably be different" including things like "what hive HKCU is changed, so any per-user registry settings will be 'lost'".



  • @blakeyrat said:

    That blog post spells out exactly why this is a good design choice.

    I certainly agree having shims for old applications is a good choice.

    However, this particular shim is done in a rather brain-damaged way. A good shim should, at the very least, be able to apply itself only to applications that are actually old—either by detecting that it was built with old tools or by making the new tools mark the application as not needing the shim by default (the py2exe loading code is build with VS2010).

    @Kian said:

    You're the one advocating for a setup executable that doesn't behave like an installer. You are the one supposed to explain what the hell this setup.exe is doing that doesn't need elevated privileges.

    I can't speak for @TimeBandint, but in my case the tool I was creating was actually an installer. It was just installing something into an attached mobile device over USB rather than into the computer itself.

    @Buddy said:

    Out of interest, is py2exe doing the correct thing here? It sounds like the weird behavior is only triggered when windows can't find a manifest, so shouldn't py2exe be embedding a manifest? Seems a bit shit to complain about the os making its best guess about missing information when you've neglected to provide that information.

    Probably not. Or it does not put the right magic values in it, because just embedding manifest is, according to the linked articles, not enough.

    There is a bit of problem with manifests. They should be promoted, but they are almost secret. I never came across anything saying that I should have it and what it is good for. The project templates generated by Visual Studio never seemed to have one. Colleagues with more experience didn't seem to know much about them either.



  • @Maciejasjmj said:

    Yes, but elevating it mid-run isn't.

    Really? I could have sworn it was possible to elevate an existing process without restarting it or creating a new one. If not, that's really stupid.



  • @FrostCat said:

    Given that elevation will cause an application to restart as a different user

    Will it?

    The elevated privileges are granted by the Administrators group and you can turn UAC off and if you are in that group, then all your processes will have elevated privileges, yet still be your processes.


  • Discourse touched me in a no-no place

    @Bulb said:

    Will it?

    The elevated privileges are granted by the Administrators group

    Perhaps that's it. I do know for sure that if you elevate, things like drive mappings aren't there for the elevated process. I always thought that was because you ran as a different user, but perhaps there's another explanation.


  • Garbage Person

    I think you may be conflating elevated apps with apps literally being run as "administrator".

    II just elevated Notepad and it still has access to my drive mappings.


  • Discourse touched me in a no-no place

    @FrostCat said:

    I do know for sure that if you elevate, things like drive mappings aren't there for the elevated process.

    That's not true.Edit: Seems true on Windows 10! :wtf:


  • Discourse touched me in a no-no place

    @Weng said:

    I think you may be conflating elevated apps with apps literally being run as "administrator".

    Hmm, could be.


  • Discourse touched me in a no-no place

    @Weng said:

    II just elevated Notepad and it still has access to my drive mappings.

    I just tried elevating both Notepad and Command Prompt on Windows 10 and lost access to mapped drives within them :wtf:
    Doesn't do it under Windows 7, and IIRC didn't under Windows 8 either.


  • Garbage Person

    Don't have a win10 box at work. Will attempt repro later.



  • @blakeyrat said:

    THE USER IS IN FUCKING CHARGE YOU OPEN SOURCE DUMBSHIT.

    Don't bring opensource into this like if "opensource" is a bad attribute for software. A lot of opensource applications suck, but they wouldn't get any better just by closing their source code. And Linux does keep a lot of shit for compatibility reasons, just look at automake. That shit should have died in the past millenium.

    As a user I am annoyed with this type of stupidity MS does with Windows. It's not better for users, they do it just to get people to update faster. Any decent software would be fixed in the next version, and developers would start to be more careful before doing undocumented dumb hacks.

    And that ridiculous command prompt. Just make powershell the default, with a decent behavior when I resize the window. But no, they gotta keep it compatible with MS-DOS. Fuck that.


Log in to reply