[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.setup

How do I add a directory in VS2003 setup project

Marcus

9/11/2006 3:09:00 PM

I want to add a folder to C:\Documents and Settings\All
Users\Application Data in my setup project.

I rightclick the left window in file system editor in VS2003 setup
project to add a special folder but I can not find one that seems to be
what I want.

If I can not do it in the setup project I have to create the folder in
my app during application runtime using ALLUSERSPROFILE somehow. I dont
want to do that though.

how do I do it in the setup project

4 Answers

Vadym Stetsyak

9/12/2006 1:51:00 PM

0

Hello, Marcus!

M> I rightclick the left window in file system editor in VS2003 setup
M> project to add a special folder but I can not find one that seems to be
M> what I want.

M> If I can not do it in the setup project I have to create the folder in
M> my app during application runtime using ALLUSERSPROFILE somehow. I dont
M> want to do that though.

you need CommonAppDataFolder property for that. I'm afraid that it cannot be done
via setup project.

What you can do is, add custom directory in the setup project. Then using
Orca took open msi, find that custom directory in the "Directory" table and
change its name into "CommonAppDataFolder"

( http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/system_folder_prop... )

--
Regards, Vadym Stetsyak
www: http://vadmyst.bl...

Wolfgang Hauer

9/12/2006 3:46:00 PM

0

Hi!

Add a custom installer to your app and use the aftercommit event.

wolfgang

"Vadym Stetsyak" <vadym_s@ukr.net> schrieb im Newsbeitrag
news:OqBZYIn1GHA.3644@TK2MSFTNGP03.phx.gbl...
> Hello, Marcus!
>
> M> I rightclick the left window in file system editor in VS2003 setup
> M> project to add a special folder but I can not find one that seems to be
> M> what I want.
>
> M> If I can not do it in the setup project I have to create the folder in
> M> my app during application runtime using ALLUSERSPROFILE somehow. I dont
> M> want to do that though.
>
> you need CommonAppDataFolder property for that. I'm afraid that it cannot
> be done
> via setup project.
>
> What you can do is, add custom directory in the setup project. Then using
> Orca took open msi, find that custom directory in the "Directory" table
> and
> change its name into "CommonAppDataFolder"
>
> (
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/system_folder_prop... )
>
> --
> Regards, Vadym Stetsyak
> www: http://vadmyst.bl...


Phil Wilson

9/12/2006 10:37:00 PM

0

Visual Studio isn't very good at the folders thing. However if you
right-click on File System on Target Machine in the setup projects's IDE you
can add one of these folders as a destination choice: User's Application
Data or User's Personal Data. I think they would be a better choice because
when I look at Documents&Settings\All Users\Application Data ordinary users
can't write to it.
--
Phil Wilson
[Microsoft MVP Windows Installer]

"Vadym Stetsyak" <vadym_s@ukr.net> wrote in message
news:OqBZYIn1GHA.3644@TK2MSFTNGP03.phx.gbl...
> Hello, Marcus!
>
> M> I rightclick the left window in file system editor in VS2003 setup
> M> project to add a special folder but I can not find one that seems to be
> M> what I want.
>
> M> If I can not do it in the setup project I have to create the folder in
> M> my app during application runtime using ALLUSERSPROFILE somehow. I dont
> M> want to do that though.
>
> you need CommonAppDataFolder property for that. I'm afraid that it cannot
> be done
> via setup project.
>
> What you can do is, add custom directory in the setup project. Then using
> Orca took open msi, find that custom directory in the "Directory" table
> and
> change its name into "CommonAppDataFolder"
>
> (
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/system_folder_prop... )
>
> --
> Regards, Vadym Stetsyak
> www: http://vadmyst.bl...


Marcus

9/13/2006 5:22:00 AM

0

Phil Wilson skrev:

> Visual Studio isn't very good at the folders thing. However if you
> right-click on File System on Target Machine in the setup projects's IDE you
> can add one of these folders as a destination choice: User's Application
> Data or User's Personal Data. I think they would be a better choice because
> when I look at Documents&Settings\All Users\Application Data ordinary users
> can't write to it.
> --

I did manage to create my folder in VS2003 setup project (at
Documents&Settings\All Users\Application Data).
But as you says Phil, limited users cant access the files in it (that
is if the files were created by an administrator). For test purpose I
had a limited user create a file in the folder and that file could be
accessed by both the limited creator and the administrator though.

I really need to have one file that everyone can read/write. Where
should a put such a file? Isn't there any globally accessible folder?
(Off scope a bit, but if someone knows the answer to this it would
really make my day).