[英]Default Location to System Drive in Setup and Deployment Project
I have a setup and deployment project in Visual Studio 2010我在 Visual Studio 2010 中有一个安装和部署项目
The default location of Application Folder is set to C:\\[Appname]应用程序文件夹的默认位置设置为 C:\\[Appname]
The problem is that if there is no drive C: in the machine the app is being installed, the installer will crash with an error " 'xxxxxxxx' is not a valid file name " or something similar, because the installer verifies the location before the user has a chance to set the actual application installation folder.问题是,如果安装应用程序的机器中没有 C: 驱动器,安装程序将崩溃并显示错误“ 'xxxxxxxx' 不是有效文件名”或类似错误,因为安装程序会在安装之前验证位置用户有机会设置实际的应用程序安装文件夹。 (so the default location is validated and since drive c: is missing it throws this error)
(因此验证了默认位置,并且由于驱动器 c: 丢失它会引发此错误)
You can set the location to something like [ProgramFilesFolder] \\[AppName] etc..您可以将位置设置为[ProgramFilesFolder] \\[AppName] 等。
I would like to know what is the "macro" for the system's windows drive !我想知道系统的windows驱动器的“宏”是什么! I would expect something like [WindowsDrive] or [SystemDrive] or something like that so that I could set the default location to [SystemDrive]\\[Appname] , for instance!
我希望像[WindowsDrive]或[SystemDrive]或类似的东西,以便我可以将默认位置设置为[SystemDrive]\\[Appname] ,例如!
Does anybody know?有人知道吗?
我认为http://msdn.microsoft.com/en-us/library/aa372057.aspx包含您正在寻找的信息(对于 .NET 3.5,其他框架可能有所不同)。
Hopefully the following explanation/screenshots will make it easier for future readers to set the default location:希望以下说明/屏幕截图将使未来的读者更容易设置默认位置:
Hope this helps.希望这可以帮助。
[WindowsVolume][Manufacturer]\[ProductName]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.