all groups > dotnet setup > january 2006 >
You're in the

dotnet setup

group:

Dynamic Folder in Setup Project


Dynamic Folder in Setup Project segal.aviad NO[at]SPAM gmail.com
1/11/2006 12:02:31 AM
dotnet setup:
Hi,

I'm building a setup project. I would like to create a dynamic folder,
meaning, the name of the folder will change according to a parameter I
send in the command line. Can this be done within the msi? Or do I need
to perform this in a custom action?

In addition, I would like to create a dynamic shortcut. Again the
shortcut location and parameters should be the value of a parameter
accepted in the comman line. Can this be done within the msi?

Thanks in advance,
A.
Re: Dynamic Folder in Setup Project Phil Wilson
1/12/2006 7:32:40 AM
On the command line you can say something like msiexec <etc>
MYPROPERTY=C:\SomeFolder. In the setup project, use the File System on
Target Machine view to create a custom folder with that property name as its
value. Right-click "File System on...." and Add Special Folder, Custom
folder.

The shortcut is tricky because internally they are built at install time and
tied to the target executable. You'd have to write custom action code
passing the property from the command line in CustomActionData.
--
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

[quoted text, click to view]

Re: Dynamic Folder in Setup Project millymeter NO[at]SPAM gmail.com
1/16/2006 1:17:51 AM
Hi,
Thanks for the advice. However, I'm still having trouble creating the
folder. Once I created the custom folder, how do I pass the MYPROPERTY
value to the folder name?

Thanks
Re: Dynamic Folder in Setup Project Phil Wilson
1/20/2006 7:35:34 AM
When you've added the custom folder, its properties let you say what
property the folder is named from. By default it puts something like
NEWPROPERTY1 in there, just put MYPROPERTY there, the one you got from the
command line.
--
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

[quoted text, click to view]

Re: Dynamic Folder in Setup Project Arvinth Chandrmouli
1/30/2006 1:29:02 PM
Hello Phil,
I am trying to create a web setup project to install multiple
virtual directories. When I start my install it should show a dialog
with add/remove options using which I should be able to add or remove
virtual directories from the server. Is there anyway to do it. I bought
your book hoping it would have some solution. Unfortunately there was no
solution. Thanks for your help.

Arvinth.




AddThis Social Bookmark Button