|
-
Apr 25th, 2007, 04:56 PM
#1
Thread Starter
Fanatic Member
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
-
Apr 25th, 2007, 05:05 PM
#2
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
Apr 25th, 2007, 08:10 PM
#3
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}
-
Apr 26th, 2007, 02:00 AM
#4
Fanatic Member
Re: Inno and Vista
C:\Users\Public\YourAppNameHere
I will just be using the above in XP and Vista
-
Apr 26th, 2007, 02:03 AM
#5
Re: Inno and Vista
 Originally Posted by RobCrombie
I will just be using the above in XP and Vista
Complete thoughts....
-
Apr 26th, 2007, 03:21 AM
#6
Re: Inno and Vista
 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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
May 2nd, 2007, 01:58 PM
#7
Thread Starter
Fanatic Member
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
-
May 2nd, 2007, 02:08 PM
#8
Fanatic Member
Re: Inno and Vista
 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.
-
May 2nd, 2007, 02:24 PM
#9
Re: Inno and Vista
Yes, I answered that question...
Use MinVersion and OnlyBelowVersion to detect OS's for conditional installation of files.
-
May 2nd, 2007, 08:43 PM
#10
Thread Starter
Fanatic Member
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
-
May 2nd, 2007, 08:48 PM
#11
Re: Inno and Vista
I image you can write code to change the DefaultDir parameter depending on the OS version.
-
May 2nd, 2007, 10:05 PM
#12
Thread Starter
Fanatic Member
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
-
May 3rd, 2007, 05:14 AM
#13
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|