[英]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.