简体   繁体   English

使用nsis安装程序复制文件夹,仅显示一个状态窗口,用于复制多个文件夹,一起复制多个文件夹

[英]copy folders using nsis installer, display only one status window for copying multiple folders , copy multiple folders together

CopyFiles of NSIS installer displays different "Windows Status windows of the copy operation" when copying different folders, but i want that only one status window is shown ,whether i copy one or two or five folders, like in Windows, when we select two folders , then only a single COPY STATUS Window is shown in which the progress of copy operation for both the folders is displayed. 当复制不同的文件夹时,NSIS安装程序的CopyFiles显示不同的“复制操作的Windows状态窗口”,但是我希望仅显示一个状态窗口,而不是像在Windows中一样复制一个或两个或五个文件夹,当我们选择两个文件夹时,则仅显示一个COPY STATUS窗口,其中显示两个文件夹的复制操作进度。

Is this possible? 这可能吗? I want to copy multiple folders, but show only one status window of the copy operation. 我想复制多个文件夹,但是只显示复制操作的一个状态窗口。

You can't do it with CopyFiles which only allows a single "from" path. 您不能使用CopyFiles来做到这一点, CopyFiles仅允许一个“ from”路径。 Here are three alternatives: 这是三种选择:

  • You could do the first, check the error flag to see if the user cancelled it and if it's not set use /SILENT on the second. 您可以执行第一个操作,检查错误标志以查看用户是否取消了它,以及是否未在第二个上使用/SILENT进行设置。

  • You could use /SILENT on both (personally I never use CopyFiles without /SILENT as I don't want the user to be able to cancel it). 您可以同时使用/SILENT (就我个人而言,我从来不使用没有 / SILENT的CopyFiles 因为我不希望用户能够取消它)。

  • If you really want to, you could do it with a direct DLL call - I don't know what the function would be and I expect you would need to construct a null-separated double-null-terminated string, all of which is fiddly with NSIS. 如果确实需要,您可以通过直接DLL调用来做到这一点-我不知道该函数是什么,我希望您需要构造一个以null分隔的双null终止的字符串,所有这些都很简单与NSIS。 I doubt that you'll think it's worth it. 我怀疑您会认为这是值得的。 If you really want to do it this way, for a null-separated string use NullByte.nsh which we at PortableApps.com wrote for the PortableApps.com Launcher (for dealing with kernel32::GetPrivateProfileSection - we've since switched to parsing the INI file in pure NSIS as it's faster and not buggy; we will also use for dealing with services). 如果您真的想这样做,请使用NullByte.nsh(用null分隔的字符串),该文件在PortableApps.com上为PortableApps.com启动器编写(用于处理kernel32 :: GetPrivateProfileSection-从那以后,我们切换到解析纯NSIS中的INI文件,因为它速度更快且没有错误;我们还将用于处理服务)。

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

相关问题 将文件复制到多个文件夹,而不是子文件夹批处理 - Copy a file into multiple folders, not subfolders batch 如何使用字典将文件从一个文件夹复制到多个其他文件夹 - How to copy files from one folder to multiple other folders using a dictionary 如何使用批处理文件将多个文件夹复制到另一个路径? - How do I copy multiple folders to another path with a batch file? PowerShell 将文件复制到文本或 csv 文件中列出的多个文件夹的脚本 - PowerShell Script to copy file to multiple folders listed in text or csv file 从Linux中包含文件夹名称的多个文件夹复制文件 - Copy files from multiple folders with including folder name in Linux 将多个文本文件从一个文件夹复制到C ++中的不同文件夹中 - copy multiple text files from a folder into different folders in C++ 复制没有文件的文件夹,没有文件夹的文件或使用PowerShell的所有文件 - Copy folders without files, files without folders, or everything using PowerShell 仅从文件夹复制Windows文件大小 - Copy windows file size from folders only 在文件夹内迭代并仅复制子文件夹 - Iterate inside folders and copy subfolders only 将文件夹从一个目录复制到另一个目录 - Copy folders from one directory to another in R
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM