Results 1 to 13 of 13

Thread: Inno and Vista

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2005
    Posts
    586

    Inno and Vista

    So I've got an application with a few MDB's.

    The majority of my customers use XP (for now) so I put my data in a folder under the application's EXE's like this:

    MyApp\app.exe
    MyApp\Data\Data.mdb

    To avoid security problems under Vista I'd like to put the MDB's in the right place. I'm told that's in the Public folder but I'm not overly clear on that point.

    Any tips on using Inno so it works with both XP and Vista?

    Thanks!

    --DB

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

    Re: Inno and Vista

    C:\Users\Public\YourAppNameHere

    In order to keep it segragrated from other apps too.


    Try seeing is Inno supports environment variables (I never used Inno):
    %ALLUSERPROFILE%

    Should be the "C:\Users\Public" in Vista

    "C:\Documents and Settings" in XP.
    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
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Inno and Vista

    Yes, Inno Does support environmental variables...

    From Inno Setup Help Documentation:


    {%NAME|DefaultValue}


    Embeds the value of an environment variable.

    NAME specifies the name of the environment variable to use.
    DefaultValue determines the string to embed if the specified variable does not exist on the user's system.

    If you wish to include a comma, vertical bar ("|"), or closing brace ("}") inside the constant, you must escape it via "%-encoding." Replace the character with a "%" character, followed by its two-digit hex code. A comma is "%2c", a vertical bar is "%7c", and a closing brace is "%7d". If you want to include an actual "%" character, use "%25".

    NAME and DefaultValue may include constants. Note that you do not need to escape the closing brace of a constant as described above; that is only necessary when the closing brace is used elsewhere.

    Examples:

    {%COMSPEC}
    {%PROMPT|$P$G}

  4. #4
    Fanatic Member
    Join Date
    Mar 2002
    Location
    AUSTRALIA
    Posts
    603

    Re: Inno and Vista

    C:\Users\Public\YourAppNameHere
    I will just be using the above in XP and Vista
    Rob C

  5. #5
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Inno and Vista

    Quote Originally Posted by RobCrombie
    I will just be using the above in XP and Vista
    Complete thoughts....

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

    Re: Inno and Vista

    Quote Originally Posted by RobCrombie
    C:\Users\Public\YourAppNameHere
    I will just be using the above in XP and Vista
    That path is not valid for XP unless you create it but then your XP limited users may not be able to execute or modify files in it.

    Also, you really should place code or a check of some kind in case they try to install on 2000 or 98 or ME etc. Users will be users.
    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

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2005
    Posts
    586

    Re: Inno and Vista

    Thanks for all the info.

    I'm not much of an Inno expert but seems to me there should be some kind of conditional logic available to help you with a Vista vs XP install.

    There's the environment variable: %ALLUSERSPROFILE%

    So if you could do something like this:

    If %ALLUSERSPROFILE% = C:\Documents and Settings then
    ... Install wherever I like
    else
    ... Install into the C:\Users\Public\MyApp folder
    end if

    But I can't figure it out... so does Inno have anything like this?

    --DB

  8. #8
    Fanatic Member esposito's Avatar
    Join Date
    Sep 2003
    Location
    Perugia, Italy
    Posts
    961

    Re: Inno and Vista

    Quote Originally Posted by Darkbob
    Thanks for all the info.

    I'm not much of an Inno expert but seems to me there should be some kind of conditional logic available to help you with a Vista vs XP install.

    There's the environment variable: %ALLUSERSPROFILE%

    So if you could do something like this:

    If %ALLUSERSPROFILE% = C:\Documents and Settings then
    ... Install wherever I like
    else
    ... Install into the C:\Users\Public\MyApp folder
    end if

    But I can't figure it out... so does Inno have anything like this?

    --DB
    I have just asked the same question in another thread. So, can Inno detect Vista and consequently change the installation folder?
    Since I discovered Delphi and Lazarus, VB has become history to me.

  9. #9
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Inno and Vista

    Yes, I answered that question...

    Use MinVersion and OnlyBelowVersion to detect OS's for conditional installation of files.

  10. #10

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2005
    Posts
    586

    Re: Inno and Vista

    You can decide whether or not to install files based on the OS revision but I haven't found a way to do branching or conditional logic other than that. For example I haven't found a way to install to one folder if it's XP and a different folder if it's Vista.

    I suppose you could just write your entire install twice and put conditions on every single line. One install for Vista and one for XP. But that's kinda kludgy.

    --DB

  11. #11
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Inno and Vista

    I image you can write code to change the DefaultDir parameter depending on the OS version.

  12. #12

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2005
    Posts
    586

    Re: Inno and Vista

    Yes, that would be cool and exactly what I was asking about. But I can't see any way to do it. Any Inno experts out there have any ideas? Or is there another installer I should be looking at?

    --DB

  13. #13
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Inno and Vista

    Ask Klienma, he hangs out in the .NET forum. He does Inno Setup code.

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