Results 1 to 9 of 9

Thread: Running VB6 app setup program on Vista

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 1999
    Location
    Ont, Canada, Earth
    Posts
    458

    Running VB6 app setup program on Vista

    Hi,
    I'm just learning the in & outs of Vista UAC. My vb6 app is packaged using Inno setup into a setup.exe.


    I've been searching these forums for all the DOs & DONTs of installing a VB6 app on Vista with UAC.

    One of the issus is running setup program.
    I keep reading about the need to tell my users to Right-Click setup.exe and select "Run as administrator" in order to install the program correctly.

    So I did a little test:

    * First: Install for standard user account (no admin privilages)
    I found that Double-Clicking the setup.exe and Right-Clicking -> "Run as administrator" yelded the same results: UAC asking for admin password. After entering the password the setup program installs.

    * Second: Install for administrator account
    I found that Double-Clicking the setup.exe and Right-Clicking -> "Run as administrator" yelded the same results: UAC asking Allow or Deny. After entering the password the setup program installs.


    So a "normal" double-clicking setup.exe seems to produce the same dialogs as Right-Clicking -> Selecting "Run as administrator"

    If that's the case, why would I tell my users to right-click and run the setup as administrator? Why can't they just double-click as they always did?
    Last edited by Tomexx; Jan 12th, 2009 at 12:53 PM.
    Thanks

    Tomexx.

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Running VB6 app setup program on Vista

    Thread Moved

    Right clicking and selecting Run as Administrator will not ever bypass the UAC prompt (unless its off) and the user will need to have admin login credientials.

    Are you using a manifest file specifying the elevation request to admin?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 1999
    Location
    Ont, Canada, Earth
    Posts
    458

    Re: Running VB6 app setup program on Vista

    Hi Rob,
    All I'm asking is what's the advantage of right-clicking, "Run as administrator" if regular double-clicking setup.exe gives the same UAC prompt.

    Rob, all I want is to deploy vb6 app on vista with minimum hassle to the end user. The end user might have full admin privilages or he might not have any. I'm not accessing any files from Program Files, just installing the exe there. There're no data files.

    What's the right approach?
    Is there a special directive in INNO setup that I should be using on Vista?
    Is double clicking my setup.exe the right way to start installation on Vista?
    Do I really have to tell users to right-click the file and "Run as admin"?
    What is the manifest file and why I would need it?
    Thanks

    Tomexx.

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Running VB6 app setup program on Vista

    If you are an Admin and right click blah then it wont display the popup. If you dont have admin rights then it will prompt either way you run it.

    The manifest file is like the ones used for displaying XP themes on a vb6 form with the addition on an extra node to specify the elevation request level. To install any program on Vista a user need permissions and depending upon how their system is set, it may or may not be allowed by non-admins.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  5. #5
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Running VB6 app setup program on Vista

    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 1999
    Location
    Ont, Canada, Earth
    Posts
    458

    Exclamation Re: Running VB6 app setup program on Vista

    Ok, then not all non-admins can install programs.
    So I should tell my users to right-click "run as admin" if they're having trouble installing, right?

    How about the manifest file, how do I incorporate it, how does it solve the problem?
    Thanks

    Tomexx.

  7. #7
    Frenzied Member
    Join Date
    Mar 2008
    Posts
    1,210

    Re: Running VB6 app setup program on Vista

    If a program filename includes the word 'setup' Vista (with UAC on) automatically prompts for elevation; and the program's icon in Explorer will include the little shield.

  8. #8
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: Running VB6 app setup program on Vista

    There are a number of things Vista will sniff for trying to determine whether a program is a legacy installer (and require elevation). One thing is key substrings in the name (setup, update, etc.). Another place it looks is in extended property strings (Description, etc.) Yet another is Vista's small dictionary of byte strings in certain locations in the EXE used to identify "well known" legacy installer products.

    Inno is not "well known" and apparently doesn't use the extended properties correctly, so if you don't name the resulting EXE right... users have problems. I think they've developed a hack now of inserting a "require admin" manifest though that is far from correct. This will require elevation but causes Windows to have no idea an installer is being run.

    It is quite possible to create an innocent EXE that falls prey to any of these things if it doesn't have a manifest. You might copy some simple EXE to Vista and if it hits any of the detection criteria its icon will get the elevation sheild and it will require elevation because Vista assumes it is an installer. A proper Vista manifest bypasses this "setup sniffing."

    Manifests contain a lot of things besides an "XP styles" and execution level request, though many people use vestigial ones with only those attributes present.


    The only "first-class citizen" packages are Windows Installer MSIs, MSUs, etc. and the Inno product doesn't create them. With care these can be used for per-user installation without ever requiring elevation, but this also has its downsides. However it is so useful that Windows 7 includes new support to make per-user installs a little easier to do. Vista SP2 should be backporting this technology but the essentials to do it properly have been in place since XP came out.

    ClickOnce is another fully supported installer technology but has its own troubles and is very difficult to use with VB6 right now. I'm sure we'll have that nut cracked soon though.

  9. #9
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: Running VB6 app setup program on Vista

    Inno, PDW, IExpress, etc. are still perfectly fine to use. There are just a few "gotchas" to be aware of.

Posting Permissions

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



Click Here to Expand Forum to Full Width