PDA

View Full Version : Vista installation - a quickie (FAQ from C6 NG)



NewsArchive
02-27-2007, 08:35 AM
I have read many articles on these NG's which basically say (and I quote
from one) "Vista is no longer going to allow you to write to folders under
Program Files".

I have installed my application using a professional installer (not
SetupBuilder) that creates all the required permissions and manifests to
Program Files but more importantly writes all my data to a subfolder of DATA
within the Program Files structure.

I have no problems at all with this method. I am writing to TPS and TXT
(ini) files and even IIF and other file formats.

Is there some gotcha in here that is lurking waiting to bite me as I cannot
find any problems so far?

I am using Vista Business.

TIA

John Fligg

NewsArchive
02-27-2007, 08:36 AM
John,

Under Windows XP, most users normally live in Administrator login mode.
This will **completely** change under Vista. The new Windows Vista UAC mode
allows you to login as a Standard User, but still perform admin tasks. So
most users live in Vista Standard User mode and you cannot write to Program
Files or any of its subfolders any longer. And of course, there are more
restrictions.

You have to make sure that your program can run as a mixed mode application
under Vista. This is only possible if you play the Vista rules (don't write
to Program Files from within your app, don't write to HKLM from within your
app, etc., embed a Vista-aware manifest into your app and code-sign it).

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing Certificate Partner

NewsArchive
02-27-2007, 08:36 AM
By the way, your installer should always request "requireAdministrator"
execution level under Vista.

But your own application should only request "asInvoker" execution level.

HTH,

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing Certificate Partner

NewsArchive
02-27-2007, 08:36 AM
So am I being way too simplistic here -

Just install to a sub folder of the root directory?

John

NewsArchive
02-27-2007, 08:36 AM
John,

A folder at the root should work. And CSIDL_COMMON_DOCUMENTS seems to be a
good "standard place" to store writeable not public shared files to please
the Vista UAC feature.

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing Certificate Partner

NewsArchive
02-27-2007, 08:37 AM
That was one of my questions when reading this thread...

If I wanted a public data location do I need to create my own or is the a
common shared data location....

paul macfarlane

NewsArchive
02-27-2007, 08:37 AM
Hi Paul,

Sorry, I need vacation :-( Should read: "to store writeable public shared
files".

This *is* a public data location. You can write to it in Standard User and
Administrator mode.

I have added built-in support for CSIDL_COMMON_DOCUMENTS in SB61.

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing Certificate Partner

NewsArchive
02-27-2007, 08:37 AM
H Friedrich,

What is the difference between CSIDL_COMMON_DOCUMENTS and
CSIDL_COMMON_APPDATA? I know what MSDN says about the two and it seems that
putting your applications's data in a subfolder of CSIDL_COMMON_APPDATA would
make more sense than a subfolder of CSIDL_COMMON_DOCUMENTS. What do you
think?

Peter Gysegem
Beaver Creek Software

NewsArchive
02-27-2007, 08:37 AM
Hi Peter,
In Vista it works like this ... if it is a (normally) hidden system folder,
then if you place anything in them they will be virtualized.
I tried using CSIDL_COMMON_APPDATA (this is the All Users folder) and was
able to _create_ my ini file there, but once my application wrote to the ini
file it got virtualized. Bummer! So, for now at least, I have opted for
placing our ini files (and other temporary files) in a sub folder of the
CSIDL_PERSONAL (My Documents) folder.
Regards
Randy

NewsArchive
02-27-2007, 08:38 AM
I started using a AllUsers.INI in the app directory for shared settings,
and LoginUser.INI for specific users so that when I backed up my data
drive which had the app dir on it with data dir below that, I got
everything. Sounds like I'm VISTA aware by dumb luck and good backup
practices.

HTH,
Paul

NewsArchive
02-27-2007, 08:38 AM
Hi Peter,

Sorry, I had nearly 400 emails in my InBox each day (no spam <g>) and missed
your question here.

CSIDL_COMMON_APPDATA should only be used for application data that is not
user specific! It's "read-only" for Standard Users. Your application's
installer needs to set ACLs on your subdirectory of CSIDL_COMMON_APPDATA to
allow users to access that directory as required by your application.

MS has confused everyone by telling people that they can put shared data in
CSIDL_COMMON_APPDATA but that damn folder and all subfolders are "hidden" on
Vista so your users can't see any of your shared files if you place them
here.

IMO, CSIDL_COMMON_DOCUMENTS seems to be a good candidate to store writeable
not public shared files.

Does this help?

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
02-27-2007, 08:38 AM
Hi Friedrich,

>MS has confused everyone by telling people that they can put shared data in
>CSIDL_COMMON_APPDATA but that damn folder and all subfolders are "hidden" on
>Vista so your users can't see any of your shared files if you place them
>here.

Is there anywhere a comprehensive webpage on msdn or anywhere else
that gathers this information into one place, i.e. where what should
be for vista as well as older versions. Not just about where to
install applications, but where to put user data, where to put
non-user specific data, what registry keys to use etc. etc. I have
searched several times on the msdn website as well as microsoft.com
and not really found anything useful except bits and pieces here and
there. Actually most of the information I have on this is from you<g>

Best regards,

Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com

Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php

NewsArchive
02-27-2007, 08:38 AM
Hi Arnór,

<G>

Unfortunately, there isn't such a place :-( And the best thing is, some
Vista information on MSDN is incorrect (because still based on a beta or RC
version and functionality changed in the final) or it is only the half
truth.

I am working on an "Everything you ever wanted to know about Vista
installations but were afraid to ask" whitepaper. I hope to make it
available soon.

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
02-27-2007, 08:39 AM
Hi Friedrich,

>I am working on an "Everything you ever wanted to know about Vista
>installations but were afraid to ask" whitepaper. I hope to make it
>available soon.

Thanks:) When you are done, send MS a bill;)

Best regards,

Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com

Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php

NewsArchive
02-27-2007, 08:39 AM
_And_ send it to Bill@MS! :-)

rocky phelps

NewsArchive
02-27-2007, 08:40 AM
Hi Arnor,

>Thanks:) When you are done, send MS a bill;)

Couldn't resist. A bill to Bill.;-)

Regards

Shankar

NewsArchive
02-27-2007, 08:40 AM
On 23 Feb 2007 13:00:42 -0500, Arnor Baldvinsson wrote:

> When you are done, send MS a bill;)

Send em a thank you note. Vista is the best thing to ever happen to
Lindersoft.
--

Mark

NewsArchive
02-27-2007, 08:40 AM
Mark,

>> When you are done, send MS a bill;)
>
> Send em a thank you note. Vista is the best thing to ever happen to
> Lindersoft.

<ROFL> Well, I cannot agree more... :)

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
02-27-2007, 08:40 AM
Friedrich,

I remember some of your very early postings in the last century. Who
knew you would be someone who makes a difference and a small fortune.

I've learned a lot just by using your software and reading your help.
I've been developing for many years, but you have raised the bar pal.

Sure there are still some horrible bugs in SetupBuilder, but the help
docs are awesome. Your recent agreement with Comodo and your work with
Vista is a real 'WOW'. Who cares about the bugs!

A fan,
George Riddell.

NewsArchive
02-27-2007, 08:40 AM
George,

Thank you for your kind words.

BTW, if time permits, it would be great if you could send me a list of bugs
you have discovered and we'll fix them.

Thanks,
Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
02-27-2007, 08:41 AM
Thanks Friedrich,

Also thanks for the reply to my private SB6 Dev question.

Microsoft certainly isn't making this easy on developers when one of their
documents says, "Put user data here" and another says, "This folder can be
accessed by administrators."

I think the best registry tip I found was about a way to make a subfolder of
HKLM\Software non-virtualized using the new FLAGS parameter on Reg.exe.

By the way, I cannot find CSIDL_COMMON_DOCUMENTS in the list for Get Special
Folder Path. I assume that will be in the next release?

Peter Gysegem
Beaver Creek Software

NewsArchive
02-27-2007, 08:41 AM
Hi Peter,

:)

Yes, the CSIDL_COMMON_DOCUMENTS (and some more interesting CSIDLs) will be
available in SB61 (next week).

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
02-27-2007, 08:41 AM
Hi Friedrich

What ACLs, specifically, need to be set to prevent virtualization?

Thanks
Randy

NewsArchive
02-27-2007, 08:42 AM
Hi Randy,

During installation, create your own subdirectory of CSIDL_COMMON_APPDATA
and set sub-folder's ACL to allow read/write access to everyone.
SetupBuilder 6.1 will be able to handle this for you.

BTW, Microsoft's intention is to remove virtualization from future versions
of Vista (virtualization is already disabled on Vista 64-bit). So I agree,
it is wise not to rely on virtualization.

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
02-27-2007, 08:42 AM
Friedrich

Do you know of anywhere where there is a full guide to installation. I would
use setup builder but just paid $300 for an update to my previous installer
software which works very well. It tells me it is all, configure for Vista
and there are technical documents with it but there is no mention of where
to store data.

I have only just got Vista so not had time to play as yet. I have 2 real
pressing concerns:

1. This writing of data .... I would really love to keep things as they are.
I use a sub folder called Data in my app. Using the root directory to
install to and a sub folder of data - would that cause any problems?

2. What exactly is this common data area?

I do not expect you to answer me in detail hence some place where I could go
to read up on all this but preferably Clarion based.

I have had aclient install to Vista which failed under Program files. They
reinstalled to the root dorectory and all seems to be working but I am
really playing in the dark right now.

Many thanks

John

NewsArchive
02-27-2007, 08:42 AM
John,

> Do you know of anywhere where there is a full guide to installation. I
> would use setup builder but just paid $300 for an update to my previous
> installer software which works very well. It tells me it is all, configure
> for Vista and there are technical documents with it but there is no
> mention of where to store data.

There is no "full guide to installation" available (from Microsoft). But
we are working on a "Everything you ever wanted to know about Vista
installations but were afraid to ask"(tm) whitepaper.

We'll summarize the experience that we gained during our and our clients'
Vista journey.

> I have only just got Vista so not had time to play as yet. I have 2 real
> pressing concerns:
>
> 1. This writing of data .... I would really love to keep things as they
> are. I use a sub folder called Data in my app. Using the root directory to
> install to and a sub folder of data - would that cause any problems?

Writing of data should not be a problem in this case. If you install your
application under a new folder under the root drive (e.g. c:\my folder),
then UAC will not (directly) kick in.

There is always a "but". The problem is that "Only Elevate UIAccess
Applications That Are Installed In Secure Locations" group policy is
enabled by default. In this case, Vista will not give UIAccess privileges
and user rights to any executable files that are launched from a location
other than the Program Files or Windows directories.

UIAccess applications are applications designed specifically to assist with
user accessibility. These applications typically send information to other
applications. An example of a UIAccess application is an on-screen keyboard
application. Or applications that need to send messages (e.g. using the
SendMessage API) to other applications.

In this case there is no other choice but to install into Program Files.

>
> 2. What exactly is this common data area?
>

For Vista, there is no definite answer to this question. For example, a
Standard User cannot write to the CSIDL_COMMON_APPDATA folder. This does
not make any sense, IMO. We found out that CSIDL_COMMON_DOCUMENTS seems
to be a good candidate to store writeable not public shared files.

Yes, there is always a "but" <g>. The CSIDL_COMMON_DOCUMENTS csidl is not
available on Windows 2003 machines. So we have developed a workaround in
the upcoming SetupBuilder 6.1 to support it on all 2000, XP, 2003, and
Vista machines.

Today's challenge is to write an installer that really works on all Windows
systems.

> I do not expect you to answer me in detail hence some place where I could
> go to read up on all this but preferably Clarion based.
>
> I have had aclient install to Vista which failed under Program files.
> They reinstalled to the root dorectory and all seems to be working but I
> am really playing in the dark right now.

MSDN is a good place. I have studied all available resources, I have worked
quite a few month to make SetupBuilder Vista-aware, but feel that we are
still at the beginning of a long process.

HTH,

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner