[英]Why Installshield LE Visual Studio 2010 Primary Output puts generated files on desktop
I have a solution in Visual Studio 2010, with seven projects. 我在Visual Studio 2010中有一个解决方案,包含七个项目。 I have added a Installshield LE Setup project and when I add my main projects Primary-Output and then add a shortcut for the Primary-Output on the desktop, in the Installshield assistant.
我已经添加了Installshield LE安装项目,并且当我添加主项目Primary-Output时,然后在Installshield助手中为桌面上的Primary-Output添加了快捷方式。
Now when I install my application it creates a shortcut on the desktop, as expected. 现在,当我安装应用程序时,它会按预期在桌面上创建一个快捷方式。 But when I run my application;
但是当我运行我的应用程序时; it has a built-in logging class that generates a few log files.
它具有一个内置的日志记录类,该类生成一些日志文件。 Now when I click the shortcut on the desktop to run the application, it creates my log files on the desktop, as well as where they are supposed to be created, which is the applications directory.
现在,当我单击桌面上的快捷方式以运行应用程序时,它将在桌面上创建我的日志文件,以及应该在哪里创建日志文件,这是应用程序目录。
Why does installshield do this, because it's my understanding that it should only link to the .exe in the applications install folder, not think that it's launching the application from it's install folder. 为什么installshield这样做,因为据我了解,它仅应链接到应用程序安装文件夹中的.exe,而不认为它是从安装文件夹中启动应用程序。
I have gotten this to work by manually adding my output files to the setup project, but this is not ideal, as I would love to be able to configure this and then when I need to build a new installer, just build project and it's done. 我已经通过手动将输出文件添加到安装项目中来使它起作用,但这并不理想,因为我希望能够进行配置,然后在需要构建新的安装程序时,只需构建项目并完成。
If anybody can recommend a better installer that fits my needs, that would be great. 如果有人可以推荐适合我需求的更好的安装程序,那就太好了。
Installer Requirements 安装程序要求
Something that is simple to get a setup project created, as I have a deadline and was only given 1 day to build and package a release build for a client. 创建安装项目很容易,因为我有一个截止日期,并且只有1天的时间为客户构建和打包发行版本。
Sounds like your app is creating log files wherever it's launched from, which isn't really Installshield's fault. 听起来好像您的应用程序无论在哪里启动都在创建日志文件,但这并不是Installshield的错。 You should really be writing to somewhere like the LocalApplicationData folder: http://msdn.microsoft.com/en-us/library/system.environment.specialfolder.aspx
您实际上应该写到LocalApplicationData文件夹之类的地方: http : //msdn.microsoft.com/zh-cn/library/system.environment.specialfolder.aspx
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.