简体   繁体   English

使用InnoIDE写入AppData目录?

[英]Write to AppData directory using InnoIDE?

I need to write to the: 我需要写信给:

C:\\Users\\user\\AppData\\Roaming\\AppName C:\\用户\\用户\\应用程序数据\\漫游\\ AppName的

folder during the setup process. 安装过程中的文件夹。 I'm using the InnoIDE program for setup, and it's awesome. 我正在使用InnoIDE程序进行设置,这很棒。 However, it seems to be lacking an 'AppData' special folder for easily accessing that directory. 但是,它似乎缺少一个“AppData”特殊文件夹,可以轻松访问该目录。

For example, you can use: DestDir: "{app}" to write the application directory. 例如,您可以使用: DestDir: "{app}"来编写应用程序目录。

But how do you get to AppData? 但是你怎么去AppData? Is there a list of all the preset DestDir options? 是否有所有预设DestDir选项的列表?

Arg, got it. 阿格,明白了。

{userappdata} → C:\\Users\\user\\AppData\\Roaming\\AppName {userappdata} →C:\\ Users \\ user \\ AppData \\ Roaming \\ AppName

as found here: http://news.jrsoftware.org/news/innosetup/msg74694.html 如在此处找到: http//news.jrsoftware.org/news/innosetup/msg74694.html

It is not recommend to write to AppData directory using InnoIDE. 不建议使用InnoIDE写入AppData目录。 You better save user-specific data to a shared location first ( eg under {app} ) and have your application copy it from there on first startup. 您最好先将用户特定数据保存到共享位置( 例如,在{app}下 ),并让您的应用程序在首次启动时从那里复制它。

more https://stackoverflow.com/a/3036259/5929293 更多https://stackoverflow.com/a/3036259/5929293

As you said in your own answer, {userappdata} is the one you need. 正如您在自己的回答中所说, {userappdata}是您需要的。 The help manual has a list of all the Inno Setup directory constants . 帮助手册包含所有Inno Setup 目录常量的列表。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM