Replies: 6 comments 5 replies
-
You add a CustomAction of type SetDirectory after the CostFinalize standard
action that sets INSTALLFOLDER to your property. Add a condition to this
action to do it only if your property is populated.
…On Tue, Jan 31, 2023 at 12:20 PM idaamit ***@***.***> wrote:
Currently, my product is installed on pre-defined ProgramFilesFolder
property :
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="BuiltInPropertiesExample" />
</Directory>
</Directory>
I would like to install it under a different location according to
property provided in the command line. for example :
msiexec /i BuiltInPropertiesExample.msi
**LOCATION=D:\MyProduct\BuiltInPropertiesExample**
but if LOCATION property is not provided in the command, I would like to
keep the current behavior: *C:\Program Files\BuiltInPropertiesExample*
How do I make such installation ?
—
Reply to this email directly, view it on GitHub
<#7186>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCKQ27Q7PGFMB7FFHVOEY3WVDRQTANCNFSM6AAAAAAUMHW55I>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
Regards,
Fyodor Koryazhkin..
|
Beta Was this translation helpful? Give feedback.
-
Please share your authoring (project)
…On Tue, Jan 31, 2023 at 12:40 PM idaamit ***@***.***> wrote:
I added :
It doesn't work :-(
what do you mean by after CostFinalize standard action. how do I do it ?
—
Reply to this email directly, view it on GitHub
<#7186 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCKQ27H4MCQ6EGOCIZJ7UTWVDTZDANCNFSM6AAAAAAUMHW55I>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
Regards,
Fyodor Koryazhkin..
|
Beta Was this translation helpful? Give feedback.
-
It is working, I had problem in building the msi and it ran the old msi. Thank you |
Beta Was this translation helpful? Give feedback.
-
I may not fully understand your scenario, but the default behavior of the Windows Installer may work for you without needing to add a I cover this topic in the Deployment Dojo episode Last Minute Changes: Directories. |
Beta Was this translation helpful? Give feedback.
-
Hi,
Try to change your authoring as following:
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="MYCOMPANY" Name="MyConpany">
<Directory Id="SUNFOLDER" Name="MyProduct">
<Directory Id="INSTALLFOLDER" />
<Directory/>
</Directory>
</Directory>
</Directory>
…On Thu, Feb 2, 2023 at 6:12 PM idaamit ***@***.***> wrote:
I have watched the episode and it is great!!
I have the following situation :
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="MyConpany">
<Directory Id="sunFolder" Name="MyProduct"/>
</Directory>
</Directory>
</Directory>
I would like user have the ability to change the installation location but
I would like my installation files to be always under _\MyCompany\MyProduct_
for example :
msiexec /i BuiltInPropertiesExample.msi INSTALLFOLDER=D:\AllPrograms\
The product would be installed under : D:\AllPrograms\MyProduct, but I
would like it to be installed under D:\AllPrograms\MyCompany\MyProduct
In addition, what would happen if The provided folder would be invalid :
1. unexisting drive
2. Invalid folder name , folder name greater than 255 characters
3. Invalid folder name , folder name with invalid characters sach as :
,<>
—
Reply to this email directly, view it on GitHub
<#7186 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCKQ22JZTMNWJKFWGQFQATWVPMF5ANCNFSM6AAAAAAUMHW55I>
.
You are receiving this because you commented.Message ID:
***@***.***>
--
Regards,
Fyodor Koryazhkin..
|
Beta Was this translation helpful? Give feedback.
-
BTW for invalid path
We get the following error messages :
looks good |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, my product is installed on pre-defined ProgramFilesFolder property :
I would like to install it under a different location according to property provided in the command line. for example :
msiexec /i BuiltInPropertiesExample.msi **LOCATION=D:\MyProduct\BuiltInPropertiesExample**
but if LOCATION property is not provided in the command, I would like to keep the current behavior: C:\Program Files\BuiltInPropertiesExample
How do I make such installation ?
Beta Was this translation helpful? Give feedback.
All reactions