Skip to content

Windows installer runs program as wrong user #338

Closed

Description

@ccw808

At the end of installation, you are given an option to run the program. However the program is run as an administrator user, rather than the user that initially launched the installer.

Activity

  1. justinclift commented on Jun 3, 2015

    @justinclift
    Member

    Oh, that doesn't sound good. Which OS are you using, and which version of DB4S?

  2. added
    bugConfirmed bugs or reports that are very likely to be bugs.
    on Jun 3, 2015
  3. ccw808 commented on Jun 3, 2015

    @ccw808
    Author

    Windows 7 64 bit and version 3.6.0

  4. schdub commented on Jun 3, 2015

    @schdub
    Contributor

    @ccw808, do you mean "Run DB Browser for SQLite" checkbox on "Complete DB Browser for SQLite Setup" page?
    I think it is standard behaviour when you run the application from the NSIS installer.
    New process inherits permissions from the parent process - in this case installer, which was elevated using Windows UAC.
    Possible solution: get rid ability to run the app from installer.

  5. ccw808 commented on Jun 3, 2015

    @ccw808
    Author

    The UAC plug-in for NSIS has a UAC_AsUser_ExecShell macro which can be used instead of ExecShell

  6. justinclift commented on Jun 4, 2015

    @justinclift
    Member

    Ahhh, that sounds like it might do the trick. @rp- Sounds like an easy fix?

  7. rp- commented on Jun 9, 2015

    @rp-
    Contributor

    It would probably an easy fix if we had a standalon NSIS script, but our script is generated by CMAKE/CPACK and there are some settings and variables that can be tuned, but I didn't have time to look at them.

  8. chrisjlocke commented on May 2, 2017

    @chrisjlocke
    Member

    Posted this in #974, so a bit of cross-posting.... ;)

    This might help.

    http://stackoverflow.com/questions/16555625/how-to-launch-an-executable-on-the-end-of-installation-correctly

    Use Exec '"$WINDIR\explorer.exe" "$TEMP\MyUnElevatedProcess.exe"'

  9. justinclift commented on May 2, 2017

    @justinclift
    Member

    In theory 😉, that last commit should mean the installer launches DB4S in user mode, not admin mode.

    In testing here in a local VM it seems to work ok, but it'd be useful to have other people test and confirm it before I'm confident about it.

    @ccw808 @chrisjlocke Would either of you have the time/interest in trying tomorrow's nightly build (3rd May or later) to check?

  10. chrisjlocke commented on May 3, 2017

    @chrisjlocke
    Member

    Will do. 😸

  11. chrisjlocke commented on May 3, 2017

    @chrisjlocke
    Member

    Now works fine. 🥇

  12. justinclift commented on May 3, 2017

    @justinclift
    Member

    Thanks @chrisjlocke, really appreciate you taking the time for this. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed bugs or reports that are very likely to be bugs.packagingwindows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions