Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Bundle .exe needs UAC? Any way to prevent this?

  1. #11
    Quote Originally Posted by ErosOlmi View Post
    I think part of the problem is that the .EXE is downloaded from a web page.
    And I think it is the same if the .EXE comes from a mail or a .ZIP inside a mail.

    If the .EXE comes from a Setup, it should be ok.
    I will make some tests in the week-end.
    Eros,

    I'm certain that is not the case for a couple reasons. The main one is that when I built the bundle, I just ran it locally - never uploaded it to GitHub - and it immediately produced the UAC. I do agree with you that Windows SmartScreen (Windows 8/10) will keep track of applications downloaded from websites and present different (Not UAC) warnings to users based on if the app is deemed unsafe or not.

    One thing I'm curious about is in the ThinBasic_Bundle_UI window, Version Info tab, there is a "Application Key:" Field. Where does that number come from? Is it generated randomly each time you bundle, or is it generated once for each unique .tbasic source file? I wonder if Windows tracks application permissions by that Application Key or something in some way.

    Have you been able to create a bundle from the .tbasic source code? Did it give you the UAC window when you ran the exe?

    Thanks so much for looking into this - I know this isn't the most important thing for TB, so don't stress about finding an answer. It's more of just a support thing - people running the program will ask me why the UAC comes up, and if I can get it to go away they won't ever ask why it's there. :-)

    *Brian

  2. #12
    OK, I completely figured it out, and you're NOT going to believe what it is.

    Are you sitting down?

    It's the filename.

    Yup. If you have the word "update" in the name of any .exe file, it will bring up UAC when you run it.

    All you have to do to prevent this is simply change one letter in the filename - say EBBUdaterGUI_v243.exe - and it will then run without the UAC dialog.

    So far I've only tested this on Windows 7, but I'll bet the same thing happens on Windows 10 and 8 as well.

    It has nothing to do with the .exe file itself. Just the filename. Oh Windows. You're trying to be so clever, and yet you fail so hard.

    Anyway, that was a lot of work for something so silly.

    *Brian

  3. #13
    And, now that I know what to search for ("What filenames trigger UAC"), I see the full answer:

    http://stackoverflow.com/questions/2...the-uac-prompt

    That is very interesting. I assume there's no way to create any sort of "manifest" XML file to be used when compiling a bundle EXE, right?

    *Brian

  4. #14
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Brian,

    there is a trick when you can put the file following name convention "yourprogramname.exe.manifest" next to the EXE file, and that should do the trick.

    The systematic way is to put that file to EXE "resources". This is something which could be investigated on our side and I will now put some time to investigate how this can be achieved.


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  5. #15
    Petr,

    Very cool!! I will check that out (first I have to learn more about what you can put in a manifest file). Thanks for the tip-

    *Brian

  6. #16
    Petr,

    I could not get the .exe.manifest method to work.

    Is the bundle process supposed look for a yourprogramname.exe.manifest and include it in the resulting .exe?

    *Brian

  7. #17
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Hi Brian,

    with Microsoft Windows SDK, you get access to mt.exe tool, which allows to embed the manifest to EXE file. I tried it, it works, but... we don't want thinbasic users to depend on this third party dependency.
    I think the proper way would be to offer the user, during bundle process, to embed some files to resources (for example manifest).

    What do you think, Eros?


    Petr

    P.S. The Microsoft Windows SDK way works with bundled files, I tried it, but it is too much bloat for thinBasic coders. We will make it easy...
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  8. #18
    thinBasic MVPs
    Join Date
    May 2007
    Location
    UK
    Posts
    1,427
    Rep Power
    159

    Manifest

    Petr, It looks like windows 10 SDK has renamed the tool as mage.exe (mageui.exe) unless I am mistaken.

    C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools

    Mike C.
    Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
    Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
    Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
    Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370

  9. #19
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    Dear Brian,

    I've made some changes to bundling application hopefully should solve the problem.
    I've changed the manifest file that is included into bundled exe adding e new node into xml file that should say to the OS about security.
    I've followed indications here https://msdn.microsoft.com/en-us/library/bb756929.aspx using "requestedExecutionLevel" "asInvoker"

    I attach new version of ThinBasic_Bundle_UI.exe
    Please substitute the one you have into \thinBasic\thinAir\

    Let me k now if it works.

    Ciao
    Eros
    Attached Files Attached Files
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

Page 2 of 2 FirstFirst 12

Similar Threads

  1. bundle icon
    By largo_winch in forum Modules specific issues
    Replies: 8
    Last Post: 03-05-2011, 17:12
  2. Bundle updates
    By RobertoBianchi in forum thinBundle
    Replies: 4
    Last Post: 06-11-2008, 20:31
  3. How to prevent Dialog from closing before confirmation?
    By Michael Hartlef in forum UI (User Interface)
    Replies: 2
    Last Post: 03-10-2008, 15:09
  4. Bundle required dll's
    By catventure in forum thinBundle
    Replies: 12
    Last Post: 29-04-2008, 08:07

Members who have read this thread: 1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •