windows 阻止 Winzip 打开资源管理器窗口

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7741473/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 18:15:39  来源:igfitidea点击:

stop Winzip from opening up explorer window

windowsbatch-filessisexplorerwinzip

提问by Raj More

We are testing download an unzip of multiple files. Commands very similar to the ones shows are executed from a batch file (called from SSIS)

我们正在测试下载多个文件的解压缩。与显示的命令非常相似的命令是从批处理文件(从 SSIS 调用)中执行的

C:\Progra~1\WinZip\WINZIP32.EXE -min -e -o -j C:\TEMP\ZipTest\x1.zip C:\TEMP\ZipTest\Z1
C:\Progra~1\WinZip\WINZIP32.EXE -min -e -o -j C:\TEMP\ZipTest\x2.zip C:\TEMP\ZipTest\Z2
C:\Progra~1\WinZip\WINZIP32.EXE -min -e -o -j C:\TEMP\ZipTest\x3.zip C:\TEMP\ZipTest\Z3
C:\Progra~1\WinZip\WINZIP32.EXE -min -e -o -j C:\TEMP\ZipTest\x4.zip C:\TEMP\ZipTest\Z4

Unfortunately, after it is done unzipping, four Explorer windows opens up (one for each archive).

不幸的是,解压完成后,会打开四个资源管理器窗口(每个存档一个)。

enter image description here

在此处输入图片说明

While it is easy to close these windows when it runs on my desktop, I cannot close any windows down that open up under the SSIS account.

虽然在我的桌面上运行这些窗口很容易关闭,但我无法关闭在 SSIS 帐户下打开的任何窗口。

How do I prevent these windows from opening up?

如何防止这些窗口打开?

回答by Angus

I'm aware this is an old question, but I ran across it while I was attempting to solve the same problem. My solution is using WinZip 14.5 on a Windows 7 machine.

我知道这是一个老问题,但我在尝试解决同一问题时遇到了它。我的解决方案是在 Windows 7 机器上使用 WinZip 14.5。

1) Open WinZip 2) Select the Home tab 3) In the Decompress section select Unzip Options 4) Clear the check-mark in front of Show Unzipped Files 5) Close WinZip and run your script, the Windows Explorer screen should not open

1) 打开 WinZip 2) 选择主页选项卡 3) 在解压缩部分选择解压缩选项 4) 清除显示解压缩文件前面的复选标记 5) 关闭 WinZip 并运行您的脚本,Windows 资源管理器屏幕不应打开

回答by Miserable Variable

That is probably a setting in winzip GUI. There is a separate command line versionthat might pan out better but it is available with licensed versions only.

这可能是 winzip GUI 中的设置。有一个单独的命令行版本可能会更好,但它仅适用于许可版本。

You might want to consider some free command line unzip utilities, if you are not using one of the proprietary winzip compression.

如果您不使用专有的 winzip 压缩之一,您可能需要考虑一些免费的命令行解压缩实用程序

回答by Edmund Schweppe

We use the WinZip command line utilities wzzip.exe and wzunzip.exe for just that reason.

正是出于这个原因,我们使用 WinZip 命令行实用程序 wzzip.exe 和 wzunzip.exe。

I'll bet the server admins will be happy to install wzzip and wzunzip once you explain that the alternative is for them to keep logging onto the box and closing WinZip windows :-)

我敢打赌服务器管理员会很乐意安装 wzzip 和 wzunzip 一旦你解释了另一种选择是让他们继续登录到盒子并关闭 WinZip 窗口:-)

回答by William Salzman

Use the command line utilities as others have mentioned, or use a third party unzip component like the one available in cozyroc's tools.

使用其他人提到的命令行实用程序,或使用第三方解压缩组件,如 coyroc 工具中可用的组件。

回答by Natan

you can try writing a script using tasklist and taskkill. here is a perl script that will kill all explorer process that were created after running winzip:

您可以尝试使用 tasklist 和 taskkill 编写脚本。这是一个 perl 脚本,它将杀死运行 winzip 后创建的所有资源管理器进程:

#workaround to close explorer sessions created by winzip
@explorerBeforeWinzip = `tasklist /fi "imagename eq explorer.exe"`;
print "extract zip files\n";
`c:\Progra~2\Winzip\WINZIP32.EXE -min -e -o $zipFile $dest`;

@explorerAfterWinzip = `tasklist /fi "imagename eq explorer.exe"`;
for($i=0;$i<scalar(@explorerAfterWinzip);$i++)
{
    $killMe=1;
    for($j=0;$j<scalar(@explorerBeforeWinzip);$j++)
    {
        if($explorerAfterWinzip[$i] eq $explorerBeforeWinzip[$j])
        {
            $killMe=0;
            last;
        }
    }
    if($killMe==1)
    {
        print "killing process: $explorerAfterWinzip[$i]\n";
        $explorerAfterWinzip[$i] =~ m/explorer.exe\s+(\d+)\s+/;
        `taskkill /pid `;
    }
}