我正在尝试使用 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