使用Powershell提取.exe文件

俄罗斯神秘流行音乐

我正在尝试使用Powershell提取.exe文件而不使用任何其他工具。

我尝试使用System.IO.Compression.ZipFile,但这仅适用于.zip文件。

$zip_file = Get-Item ("C:\Users\00WORK\gs\gs.exe")
$destination = Get-Item ("C:\Users\tuna")
[System.IO.Compression.ZipFile]::ExtractToDirectory($zip_file,$destination)

也尝试过这个,但是没有成功

start-process C:\Users\Downloads\gs.exe -Argumentlist "/a"

也尝试过这个,但再次没有任何成功

$shell = new-object -com shell.application
$zip = $shell.NameSpace(“C:\Users\00WORK\gs\gs.exe”)
foreach($item in $zip.items())
{
$shell.Namespace(“C:\Users\tuna”).copyhere($item)
}

感谢帮助。

女神琼斯

如果您尝试过

start-process C:\Setup.exe -Argumentlist "/a"

则不可能使用powershell,此命令完全取决于文件的打包方式,如果所有其他方法均失败,我个人将使用7-Zip之类的实用程序,但正如您所说,您不希望使用该实用程序。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章