rus*_*pOP 5 powershell exe extract unzip
我正在尝试使用 powershell 提取 .exe 文件,而无需任何其他工具。
\n\n我尝试使用 System.IO. Compression.ZipFile,但这仅适用于 .zip 文件。
\n\n$zip_file = Get-Item ("C:\\Users\\00WORK\\gs\\gs.exe")\n$destination = Get-Item ("C:\\Users\\tuna")\n[System.IO.Compression.ZipFile]::ExtractToDirectory($zip_file,$destination)\nRun Code Online (Sandbox Code Playgroud)\n\n也尝试过这个,但没有成功
\n\nstart-process C:\\Users\\Downloads\\gs.exe -Argumentlist "/a"\nRun Code Online (Sandbox Code Playgroud)\n\n也尝试过这个,但再次没有成功
\n\n$shell = new-object -com shell.application\n$zip = $shell.NameSpace(\xe2\x80\x9cC:\\Users\\00WORK\\gs\\gs.exe\xe2\x80\x9d)\nforeach($item in $zip.items())\n{\n$shell.Namespace(\xe2\x80\x9cC:\\Users\\tuna\xe2\x80\x9d).copyhere($item)\n}\nRun Code Online (Sandbox Code Playgroud)\n\n感谢帮助。
\n如果你尝试过
start-process C:\Setup.exe -Argumentlist "/a"
Run Code Online (Sandbox Code Playgroud)
那么就不可能使用powershell,这个命令完全取决于文件的打包方式,如果一切都失败我个人会使用像7-Zip这样的实用程序,但正如你所说,你不想使用实用程序。
|   归档时间:  |  
           
  |  
        
|   查看次数:  |  
           20115 次  |  
        
|   最近记录:  |