简体   繁体   English

如何从VS 2010部署安装程序项目安装到Windows 7中的Public目录

[英]How to install to the Public directory in Windows 7 from the VS 2010 deployment Setup Project

I have some documents I want to install (using the Setup project) onto a Windows 7 system which is accessible by everyone. 我有一些文档要安装(使用安装程序项目)到每个人都可以访问的Windows 7系统上。 These documents should not be hidden. 这些文件不应被隐藏。 They should be visible for all users to double click on. 所有用户都应该双击它们。 I believe the best place for this is C:\\Users\\Public or C:\\Users\\Public\\Documents. 我认为最好的位置是C:\\ Users \\ Public或C:\\ Users \\ Public \\ Documents。

Since there isn't a special folder for either of these folders in the Setup project, the only way I have found so far is to create a custom folder and set the DefaultLocation to [%public][Manufacturer][ProductName] etc. 由于安装项目中的这两个文件夹都没有特殊的文件夹,因此到目前为止,我发现的唯一方法是创建一个自定义文件夹,并将DefaultLocation设置为[%public] [Manufacturer] [ProductName]等。

(see http://community.flexerasoftware.com/archive/index.php?t-164246.html ) (请参阅http://community.flexerasoftware.com/archive/index.php?t-164246.html

However, this seems very brittle; 但是,这似乎很脆弱。 what if someone deletes the environment variable for public? 如果有人为公众删除环境变量该怎么办? Also, would this work on a different language version of Windows 7? 此外,这是否可以在Windows 7的其他语言版本上使用? Is there a better way to define the DefaultLocation to the Public folder for a Windows 7 install? 是否有更好的方法将Windows 7安装的DefaultLocation定义到Public文件夹?

The public folder isn't stored in a standard environment variable (System -> Advanced -> Environment Variables) so I think it is very unlikely too many people are doing this, but I understand the need to create a robust installer. 公用文件夹未存储在标准环境变量(系统->高级->环境变量)中,因此我认为太多人这样做的可能性很小,但我知道需要创建一个强大的安装程序。

This page has instructions on changing the location of the public folder. 页面包含有关更改公用文件夹位置的说明。 The accepted solution is quite involved and requires command line work. 公认的解决方案非常复杂,需要命令行工作。 The suggestion by Luviana is much simpler. Luviana的建议要简单得多。 I would test them out and see if they break the %public% shortcut. 我将对其进行测试,看看它们是否打破了%public%快捷方式。 My guess is that they will not. 我的猜测是他们不会。 My best advice is to check it out for yourself and if it still works then you can count on the fact that %public% will be available. 我最好的建议是亲自检查一下,如果它仍然有效,那么您可以指望%public%可用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在VS 2010安装项目中自动安装.NET 4 Framework的配置 - Configuration to Automatically Install .NET 4 Framework in VS 2010 Setup Project 如何使用VS安装和部署项目并构建一个.msi文件来安装程序? - how to use VS Setup and Deployment project and build an .msi file to install the program? 在VS2010部署项目中配置Windows协议 - Configuring a Windows Protocol in a VS2010 Deployment Project 使用VS2010在安装程序安装过程中安装Windows Service - Install Windows Service during Setup installation using VS2010 C#VS2010如何强制安装项目安装应用程序而不要求用户输入 - C# VS2010 How to force setup project to install application without asking for user input VS 2010安装项目要求 - VS 2010 Setup Project requirements 使用我们的设置安装其他应用程序 - vs2010 桌面应用程序部署 - Install other apps with our setup - vs2010 Desktop App Deployment 在Vs 2010中的安装和部署中创建Windows安装程序后,Crystal Report应用程序崩溃 - Crystal Report Application Crashes after created windows intstaller in setUp and Deployment in Vs 2010 VS2010安装项目-使用PostBuildEvent以管理员身份安装后启动应用程序 - VS2010 setup project - Launch application after install as administrator using PostBuildEvent 使用自动更新功能vs2010设置项目 - Setup project with autoupdate feature vs2010
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM