|
I need to get the system drive of the target machine during installation. WindowsVolume appears to do that . So I am trying to use the predefined property WindowsVolume like this: <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="WindowsVolume"> ... </Directory> </Directory> When I try to compile it, I get an error saying The Directory Name: WindowsVolume is the same as one of the MSI public properties and can cause unforeseen side effects. If I replace WindowsVolume with ProgramFilesFolder, it compiles fine. Why doesn't it compile with WindowsVolume property? Is there any other way to get the System Drive on the target machine so that I can install my files there? Thanks Ravi ------------------------------------------------------------------------------ _______________________________________________ WiX-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/wix-users |
|
Looking at http://msdn.microsoft.com/library/aa372817.aspx (which is the
MSDN page describing the WindowsVolume property) Microsoft says: "Do not use the WindowsVolume property in the Directory column of the Directory table." (which is what the Id attribute populates). You can retrieve its value in fields that accept Formatted like this: "[WindowsVolume]" but not define directories directly using that property. I tested this: <SetDirectory Id="WINDOWSVOLUME" Value="[WindowsVolume]"/> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="WINDOWSVOLUME"> ... </Directory> </Directory> ProgramFilesFolder property does not have that restriction. I don't know why that restriction exists, the <SetDirectory> action seems to be the workaround. By the way, it is usually considered bad form to install files directly into the root folder of any drive (especially the system drive). There are also security and performance issues that can arise from doing that. That is the reason ProgramFilesFolder was created. Are you creating a subfolder under WindowsVolume where you are putting your files? -Blair -----Original Message----- From: Ravikumar Gopinath [mailto:[hidden email]] Sent: Thursday, July 23, 2009 5:31 PM To: [hidden email] Subject: [WiX-users] Error using WindowsVolume predefined folder... I need to get the system drive of the target machine during installation. WindowsVolume appears to do that . So I am trying to use the predefined property WindowsVolume like this: <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="WindowsVolume"> ... </Directory> </Directory> When I try to compile it, I get an error saying The Directory Name: WindowsVolume is the same as one of the MSI public properties and can cause unforeseen side effects. If I replace WindowsVolume with ProgramFilesFolder, it compiles fine. Why doesn't it compile with WindowsVolume property? Is there any other way to get the System Drive on the target machine so that I can install my files there? Thanks Ravi ---------------------------------------------------------------------------- -- _______________________________________________ WiX-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ _______________________________________________ WiX-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/wix-users |
|
In reply to this post by Ravikumar Gopinath
As the error message states it's a Public property, thus the reference
should be " WINDOWSVOLUME" -Michael -----Original Message----- From: Ravikumar Gopinath [mailto:[hidden email]] Sent: Thursday, July 23, 2009 8:31 PM To: [hidden email] Subject: [WiX-users] Error using WindowsVolume predefined folder... I need to get the system drive of the target machine during installation. WindowsVolume appears to do that . So I am trying to use the predefined property WindowsVolume like this: <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="WindowsVolume"> ... </Directory> </Directory> When I try to compile it, I get an error saying The Directory Name: WindowsVolume is the same as one of the MSI public properties and can cause unforeseen side effects. If I replace WindowsVolume with ProgramFilesFolder, it compiles fine. Why doesn't it compile with WindowsVolume property? Is there any other way to get the System Drive on the target machine so that I can install my files there? Thanks Ravi ------------------------------------------------------------------------ ------ _______________________________________________ WiX-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ _______________________________________________ WiX-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/wix-users |
| Powered by Nabble | Edit this page |
