Skip to content

Instantly share code, notes, and snippets.

@samuelluis
Last active July 9, 2019 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samuelluis/44d996fa942c6924bd876f5bb018d830 to your computer and use it in GitHub Desktop.
Save samuelluis/44d996fa942c6924bd876f5bb018d830 to your computer and use it in GitHub Desktop.
Descomprimir multiples autoextraibles con contraseña (ej: tuanimeligero)
@echo off
set pwshcmd=powershell -noprofile -command "&{[System.Reflection.Assembly]::LoadWithPartialName('System.windows.forms') | Out-Null;$FolderDialog = New-Object System.Windows.Forms.FolderBrowserDialog;$FolderDialog.Description = \"Elige la carpeta donde se encuentran los autoextraibles\";$FolderDialog.rootfolder = \"MyComputer\";$FolderDialog.SelectedPath = (Get-Item -Path '.').FullName; $FolderDialog.ShowDialog()|out-null; $FolderDialog.SelectedPath}"
for /f "delims=" %%s in ('%pwshcmd%') do (
set selected=%%s
)
set pwshcmd=powershell -noprofile -command "&{[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic') | Out-Null;[Microsoft.VisualBasic.Interaction]::InputBox('Confirma o escribe la clave para extraer los archivos', 'Clave', 'tuanimeligero')|Out-String}"
for /f "delims=" %%p in ('%pwshcmd%') do (
set password=%%p
)
cd %selected%
for %%f in (*.exe) do (
echo %%f
%%f -p%password% -s
)
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment