JoeViking245 Posted March 9, 2023 Share Posted March 9, 2023 The /d is needed to start that program from with it's folder. Try adding one more set of quotes (around %path2ps3dec%). start "" /w /d "%path2ps3dec%" d key %key% "%encryptedISO%" "%decryptedISO%" Quote Link to comment Share on other sites More sharing options...
darreldearth Posted March 9, 2023 Author Share Posted March 9, 2023 (edited) 5 minutes ago, JoeViking245 said: The /d is needed to start that program from with it's folder. Try adding one more set of quotes (around %path2ps3dec%). start "" /w /d "%path2ps3dec%" d key %key% "%encryptedISO%" "%decryptedISO%" Thanks. Unfortunately the result was still the same. The system cannot find the file d. set path2ps3dec=C:\Users\darre\Desktop\TEMPPS3\PS3DEC\ps3dec.exe set decryptedISO=C:\Users\darre\Desktop\TEMPPS3\DECRYPTED_GAMES\temp-decryptedGame.iso set path2RPCS3ps1=M:\LaunchBox\Emulators\rpcs3\RPCS3-ISO-LaunchBox.ps1 set encryptedISO=%1 set keyFile=%~dpn1.dkey set /p key=< "%keyFile%" start "" /w /d "%path2ps3dec%" d key %key% "%encryptedISO%" "%decryptedISO%" start "" /w "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -noprofile -executionpolicy bypass -WindowStyle hidden -file "%path2RPCS3ps1%" "%decryptedISO%" del "%decryptedISO% Edited March 9, 2023 by darreldearth Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted March 9, 2023 Share Posted March 9, 2023 Last ditch effort (ya, forgot one more thing 😊) set path2ps3dec=C:\Users\darre\Desktop\TEMPPS3\PS3DEC\ps3dec.exe set decryptedISO=C:\Users\darre\Desktop\TEMPPS3\DECRYPTED_GAMES\temp-decryptedGame.iso set path2RPCS3ps1=M:\LaunchBox\Emulators\rpcs3\RPCS3-ISO-LaunchBox.ps1 set encryptedISO=%1 set keyFile=%~dpn1.dkey set /p key=< "%keyFile%" set path=%~dp1 start "" /w /d "%path%" "%path2ps3dec%" d key %key% "%encryptedISO%" "%decryptedISO%" start "" /w "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -noprofile -executionpolicy bypass -WindowStyle hidden -file "%path2RPCS3ps1%" "%decryptedISO%" del "%decryptedISO% Quote Link to comment Share on other sites More sharing options...
darreldearth Posted March 10, 2023 Author Share Posted March 10, 2023 14 minutes ago, JoeViking245 said: Last ditch effort (ya, forgot one more thing 😊) set path2ps3dec=C:\Users\darre\Desktop\TEMPPS3\PS3DEC\ps3dec.exe set decryptedISO=C:\Users\darre\Desktop\TEMPPS3\DECRYPTED_GAMES\temp-decryptedGame.iso set path2RPCS3ps1=M:\LaunchBox\Emulators\rpcs3\RPCS3-ISO-LaunchBox.ps1 set encryptedISO=%1 set keyFile=%~dpn1.dkey set /p key=< "%keyFile%" set path=%~dp1 start "" /w /d "%path%" "%path2ps3dec%" d key %key% "%encryptedISO%" "%decryptedISO%" start "" /w "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -noprofile -executionpolicy bypass -WindowStyle hidden -file "%path2RPCS3ps1%" "%decryptedISO%" del "%decryptedISO% I appreciate you trying over and over. Seems like it got closer lol. this time it didnt have any errors, but it didnt decrypt the game so the emulator rpcs3 launched saying it couldnt find the game. The output of the CMD is below. Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted March 10, 2023 Share Posted March 10, 2023 On the output for the command to decrypt-the-iso, it's putting 2 sets of double-quotes around the input iso file for some reason. I guess remove the quotes (for that part) in the script and see what happens.?.?. Seems odd, but worth a try Quote Link to comment Share on other sites More sharing options...
darreldearth Posted March 10, 2023 Author Share Posted March 10, 2023 (edited) 5 hours ago, JoeViking245 said: On the output for the command to decrypt-the-iso, it's putting 2 sets of double-quotes around the input iso file for some reason. I guess remove the quotes (for that part) in the script and see what happens.?.?. Seems odd, but worth a try WOOT That Finally WORKED! Thanks! Now to see about trying to make a batch script using what you just made ill try doing what you posted before and see what happens lol. So for everyone else to see heres what finally ended up working (and like @JoeViking245 said only change the first 3 lines to fit your directories) (DKeys and Roms must be in same folder).... Option 1: Here's @JoeViking245's magic batch code (Below) - which uses a .batch file in conjunction with @phunky1's RPCS3-ISO-Launchbox.ps1 script found here https://github.com/ptmorris1/RPCS3-ISOLauncher-Launchbox set path2ps3dec=C:\Users\darre\Desktop\TEMPPS3\PS3DEC\ps3dec.exe set decryptedISO=C:\Users\darre\Desktop\TEMPPS3\DECRYPTED_GAMES\temp-decryptedGame.iso set path2RPCS3ps1=M:\LaunchBox\Emulators\rpcs3\RPCS3-ISO-LaunchBox.ps1 set encryptedISO=%1 set keyFile=%~dpn1.dkey set /p key=< "%keyFile%" set path=%~dp1 start "" /w /d "%path%" "%path2ps3dec%" d key %key% %encryptedISO% "%decryptedISO%" start "" /w "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -noprofile -executionpolicy bypass -WindowStyle hidden -file "%path2RPCS3ps1%" "%decryptedISO%" del "%decryptedISO%" And of coarse Option 2!: the script @phunky1 made which is posted here: https://github.com/ptmorris1/RPCS3-ISOLauncher-Launchbox works great also and achived the same result. (Dkeys and Roms can be in seperate folders if specified if location is changed in the script). Use the RPCS3-Decrypt-ISO-LaunchBox.ps1 and not the regular RPCS3-ISO-Launchbox.ps1 listed above for his all in one ISO/decode Script. Download with instructions on his github link Also a link to his original post without decoding Edited March 10, 2023 by darreldearth 1 1 Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted March 10, 2023 Share Posted March 10, 2023 Glad it's [finally] working. You should now be able to create a new emulator in LB as was originally discussed/shown way back when, using this batch file. As for the bulk decrypt batch file, now that things are all ironed out it can be fixed too. (if you decide to use it) @echo off set path2ps3dec=D:\PS3\utilities\ps3dec\ps3dec.exe set decryptedISOFolder=D:\temp\decryptedISOs\ for %%f in (*.iso) do ( set keyFile=%%~dpnf.dkey set /p key=< "%keyFile%" %path2ps3dec% d key %key% "%%f" "%decryptedISOFolder%%%f" ) pause 🤞 Quote Link to comment Share on other sites More sharing options...
darreldearth Posted March 10, 2023 Author Share Posted March 10, 2023 6 minutes ago, JoeViking245 said: Glad it's [finally] working. You should now be able to create a new emulator in LB as was originally discussed/shown way back when, using this batch file. As for the bulk decrypt batch file, now that things are all ironed out it can be fixed too. (if you decide to use it) @echo off set path2ps3dec=D:\PS3\utilities\ps3dec\ps3dec.exe set decryptedISOFolder=D:\temp\decryptedISOs\ for %%f in (*.iso) do ( set keyFile=%%~dpnf.dkey set /p key=< "%keyFile%" %path2ps3dec% d key %key% "%%f" "%decryptedISOFolder%%%f" ) pause 🤞 Yeah it worked great! Thanks for the batch file i gave it a try only changing folder locations and this was the result @echo off set path2ps3dec=C:\Users\darre\Desktop\TEMPPS3\PS3DEC\ps3dec.exe set decryptedISOFolder=C:\Users\darre\Desktop\TEMPPS3\DECRYPTED_GAMES\ for %%f in (*.iso) do ( set keyFile=%%~dpnf.dkey set /p key=< "%keyFile%" %path2ps3dec% d key %key% "%%f" "%decryptedISOFolder%%%f" ) pause Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted March 10, 2023 Share Posted March 10, 2023 Change the one line to look like (add echo in front of it). Then look at the full command line(s) that would have been executed. echo %path2ps3dec% d key %key% "%%f" "%decryptedISOFolder%%%f" I'm assuming your testing this in a folder with just 2 iso files (and their dkey files) and not ALL of them. Quote Link to comment Share on other sites More sharing options...
darreldearth Posted March 10, 2023 Author Share Posted March 10, 2023 (edited) 1 hour ago, JoeViking245 said: Change the one line to look like (add echo in front of it). Then look at the full command line(s) that would have been executed. echo %path2ps3dec% d key %key% "%%f" "%decryptedISOFolder%%%f" I'm assuming your testing this in a folder with just 2 iso files (and their dkey files) and not ALL of them. this was the output from adding echo. nothing was decrypted. just asks you to press any key to continue and then the window closes. lol and yeah im only testing with 2 files in a folder on my desktop for now haha Edited March 10, 2023 by darreldearth Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted March 10, 2023 Share Posted March 10, 2023 @echo off set path2ps3dec=C:\Users\darre\Desktop\TEMPPS3\PS3DEC\ps3dec.exe set decryptedISOFolder=C:\Users\darre\Desktop\TEMPPS3\DECRYPTED_GAMES\ set path=C:\Users\darre\Desktop\TEMPPS3\PS3DEC\ for %%f in (*.iso) do ( set keyFile=%%~dpnf.dkey set /p key=< "%keyFile%" start "" /w /d "%path%" %path2ps3dec% d key %key% "%%f" "%decryptedISOFolder%%%f" ) pause Another last ditch effort. lol Wait... the lon-gass key wasn't showing in your last image. Do you have the dkey files in with the iso's you're decrypting? So the one batch file, 2 .iso files and 2 .dkey files? Quote Link to comment Share on other sites More sharing options...
darreldearth Posted March 10, 2023 Author Share Posted March 10, 2023 19 minutes ago, JoeViking245 said: @echo off set path2ps3dec=C:\Users\darre\Desktop\TEMPPS3\PS3DEC\ps3dec.exe set decryptedISOFolder=C:\Users\darre\Desktop\TEMPPS3\DECRYPTED_GAMES\ set path=C:\Users\darre\Desktop\TEMPPS3\PS3DEC\ for %%f in (*.iso) do ( set keyFile=%%~dpnf.dkey set /p key=< "%keyFile%" start "" /w /d "%path%" %path2ps3dec% d key %key% "%%f" "%decryptedISOFolder%%%f" ) pause Another last ditch effort. lol Wait... the lon-gass key wasn't showing in your last image. Do you have the dkey files in with the iso's you're decrypting? So the one batch file, 2 .iso files and 2 .dkey files? Ugh didnt work lol. But Yeah they're all in the same folder like in the screenshot below.... The new line of code just gave this result... Quote Link to comment Share on other sites More sharing options...
phunky1 Posted March 10, 2023 Share Posted March 10, 2023 (edited) Here is a Powershell that should work. Change the first 4 variables paths to suit your needs....$PS3DEC,$ISOroot,$ISOdecrypt,$dkeys. Then save to .ps1 file and run. #path to ps3dec.exe $PS3DEC = 'C:\path\ps3dec.exe' #root folder where you keep encrypted iso $ISOroot = 'C:\MYisos' #root folder where decrypted ISO will be stored. $ISOdecrypt = 'C:\decrypted' #root folder you keep all dkeys files $dKeys = 'C:\keys' $ISOall = Get-ChildItem $ISOroot $report = foreach ($iso in $ISOall) { Clear-Variable key -ErrorAction SilentlyContinue $Key = Get-ChildItem $dKeys | Where-Object -Property name -Like "$([System.IO.Path]::GetFileNameWithoutExtension($iso.fullname))*" if ($null -ne $key){ $KeyValue = Get-Content $key.FullName $DecryptISO = $ISOdecrypt + "$([System.IO.Path]::GetFileNameWithoutExtension($iso.fullname))" + '_DEC.iso' & $PS3DEC d key $KeyValue $($iso.fullname) $DecryptISO [PSCustomObject]@{ OrginalISO = $iso.name Decrypted = $DecryptISO Status = 'Completed' } } else { [PSCustomObject]@{ OrginalISO = $iso.name Decrypted = '' Status = 'No Key found' } } } $report Edited March 10, 2023 by phunky1 Error in script Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted March 10, 2023 Share Posted March 10, 2023 Here's my updated batch file. @phunky1's PS script will probably work right from the get-go, but I'm bound and determined to get mine to work on at least your 2 test files. lol @echo off set path2ps3dec=C:\Users\darre\Desktop\TEMPPS3\PS3DEC\ps3dec.exe set decryptedISOFolder=C:\Users\darre\Desktop\TEMPPS3\DECRYPTED_GAMES\ set path=C:\Users\darre\Desktop\TEMPPS3\PS3DEC\ setlocal EnableDelayedExpansion Set key= for %%f in (*.iso) do ( set keyFile=%%~dpnf.dkey set /p key=< "!keyFile!" start "" /w /d "%path%" %path2ps3dec% d key !key! "%%~dpnxf" "%decryptedISOFolder%%%f" ) pause 1 Quote Link to comment Share on other sites More sharing options...
darreldearth Posted March 10, 2023 Author Share Posted March 10, 2023 2 hours ago, JoeViking245 said: Here's my updated batch file. @phunky1's PS script will probably work right from the get-go, but I'm bound and determined to get mine to work on at least your 2 test files. lol @echo off set path2ps3dec=C:\Users\darre\Desktop\TEMPPS3\PS3DEC\ps3dec.exe set decryptedISOFolder=C:\Users\darre\Desktop\TEMPPS3\DECRYPTED_GAMES\ set path=C:\Users\darre\Desktop\TEMPPS3\PS3DEC\ setlocal EnableDelayedExpansion Set key= for %%f in (*.iso) do ( set keyFile=%%~dpnf.dkey set /p key=< "!keyFile!" start "" /w /d "%path%" %path2ps3dec% d key !key! "%%~dpnxf" "%decryptedISOFolder%%%f" ) pause haha. Gave it shot but it didnt work. here's what it said without the ECHO also tried the older version without echo just to be sure 😁 set path2ps3dec=C:\Users\darre\Desktop\TEMPPS3\PS3DEC\ps3dec.exe set decryptedISOFolder=C:\Users\darre\Desktop\TEMPPS3\DECRYPTED_GAMES\ for %%f in (*.iso) do ( set keyFile=%%~dpnf.dkey set /p key=< "%keyFile%" %path2ps3dec% d key %key% "%%f" "%decryptedISOFolder%%%f" ) pause Quote Link to comment Share on other sites More sharing options...
darreldearth Posted March 10, 2023 Author Share Posted March 10, 2023 5 hours ago, phunky1 said: Here is a Powershell that should work. Change the first 4 variables paths to suit your needs....$PS3DEC,$ISOroot,$ISOdecrypt,$dkeys. Then save to .ps1 file and run. #path to ps3dec.exe $PS3DEC = 'C:\path\ps3dec.exe' #root folder where you keep encrypted iso $ISOroot = 'C:\MYisos' #root folder where decrypted ISO will be stored. $ISOdecrypt = 'C:\decrypted' #root folder you keep all dkeys files $dKeys = 'C:\keys' $ISOall = Get-ChildItem $ISOroot $report = foreach ($iso in $ISOall) { Clear-Variable key -ErrorAction SilentlyContinue $Key = Get-ChildItem $dKeys | Where-Object -Property name -Like "$([System.IO.Path]::GetFileNameWithoutExtension($iso.fullname))*" if ($null -ne $key){ $KeyValue = Get-Content $key.FullName $DecryptISO = $ISOdecrypt + "\$([System.IO.Path]::GetFileNameWithoutExtension($iso.fullname))" + '_DEC.iso' & $PS3DEC d key $KeyValue $($iso.fullname) $DecryptISO [PSCustomObject]@{ OrginalISO = $iso.name Decrypted = $DecryptISO Status = 'Completed' } } else { [PSCustomObject]@{ OrginalISO = $iso.name Decrypted = '' Status = 'No Key found' } } } $report I tried your code before I ran out of the house this morning, so I didnt have much time to troubleshoot😵, but after changing the paths and running the script the powershell window would open and immediately close without doing anything. I'll mess with it a bit more in a couple hours once I get back and see if I can figure out why that is and let you know. Thanks! Quote Link to comment Share on other sites More sharing options...
phunky1 Posted March 10, 2023 Share Posted March 10, 2023 (edited) 35 minutes ago, darreldearth said: I tried your code before I ran out of the house this morning, so I didnt have much time to troubleshoot😵, but after changing the paths and running the script the powershell window would open and immediately close without doing anything. I'll mess with it a bit more in a couple hours once I get back and see if I can figure out why that is and let you know. Thanks! No problem, I did find a typo just now and updated the post. That maybe the issue as it was a bad path. Just fixed a few issues and actually tested it. Has some verbose details now so hopefully good to go. https://github.com/ptmorris1/RPCS3-ISOLauncher-Launchbox/blob/master/Bulk-Decrypt-ISOs.ps1 Edited March 10, 2023 by phunky1 fixed script and added link;grammar Quote Link to comment Share on other sites More sharing options...
darreldearth Posted March 10, 2023 Author Share Posted March 10, 2023 1 hour ago, phunky1 said: No problem, I did find a typo just now and updated the post. That maybe the issue as it was a bad path. Just fixed a few issues and actually tested it. Has some verbose details now so hopefully good to go. https://github.com/ptmorris1/RPCS3-ISOLauncher-Launchbox/blob/master/Bulk-Decrypt-ISOs.ps1 hmmm... tried the new code but the same thing is happening with windowspowershell. The window launches and imediately closes. below is the code i used with my paths replacing the original ones. is there a way to pause the script at the end so the window will stay open so i can read/post what is says? i tried adding -noexit and also tried adding Read-Host -Prompt "Press Enter to exit" to the end of the script but it didnt keep the window from forcing closed #path to ps3dec.exe $PS3DEC = 'C:\Users\darre\Desktop\TEMPPS3\PS3DEC\ps3dec.exe' #root folder where you keep encrypted iso $ISOroot = 'C:\Users\darre\Desktop\TEMPPS3' #root folder where decrypted ISO will be stored. $ISOdecrypt = 'C:\Users\darre\Desktop\TEMPPS3\DecryptedGames' #root folder you keep all dkeys files $dKeys = 'C:\Users\darre\Desktop\TEMPPS3\Keys' $ISOall = Get-ChildItem -LiteralPath $ISOroot $report = foreach ($iso in $ISOall) { [int]$currentItem = [array]::indexof($ISOall, $iso) Write-Progress -Activity 'Decrypting isos....' -Status "Currently Decrypting - $($iso.name) - $($currentItem) of $($ISOall.Count - 1) $([math]::round((($currentItem + 1)/$ISOall.Count),2) * 100)% " -PercentComplete $([float](($currentItem + 1) / $ISOall.Count) * 100) Clear-Variable key -ErrorAction SilentlyContinue $Key = Get-ChildItem -LiteralPath $dKeys | Where-Object -Property name -Like "$([System.IO.Path]::GetFileNameWithoutExtension($iso.fullname))*" if ($null -ne $key){ Write-Host "Decrypting... $($iso.name)" -ForegroundColor Green $KeyValue = Get-Content -LiteralPath $key.FullName $DecryptISO = $ISOdecrypt + "\$([System.IO.Path]::GetFileNameWithoutExtension($iso.fullname))" + '_DEC.iso' & $PS3DEC d key $KeyValue $($iso.fullname) $DecryptISO [PSCustomObject]@{ OrginalISO = $iso.name Decrypted = $DecryptISO Status = 'Completed' } } else { Write-Host "No key found for $($iso.name)" -ForegroundColor Red [PSCustomObject]@{ OrginalISO = $iso.name Decrypted = '' Status = 'No Key found' } } } $report Quote Link to comment Share on other sites More sharing options...
phunky1 Posted March 10, 2023 Share Posted March 10, 2023 (edited) 12 minutes ago, darreldearth said: hmmm... tried the new code but the same thing is happening with windowspowershell. The window launches and imediately closes. below is the code i used with my paths replacing the original ones. is there a way to pause the script at the end so the window will stay open so i can read/post what is says? i tried adding -noexit and also tried adding Read-Host -Prompt "Press Enter to exit" to the end of the script but it didnt keep the window from forcing closed You downloaded the script from link right? It maybe windowsPowershell issues, but open powershell and run script from the prompt like C:\path\myscript.ps1 or path into location of script and do .\script.ps1 Oh and maybe your execution policy. run this as well: Set-ExecutionPolicy RemoteSigned -force Edited March 10, 2023 by phunky1 Set-ExecutionPolicy RemoteSigned -force 1 Quote Link to comment Share on other sites More sharing options...
darreldearth Posted March 10, 2023 Author Share Posted March 10, 2023 🥳🥳@JoeViking245 Got his code working for bulk Decrypting! This is the code he made below which worked😁 As he was saying just replace your paths in the first 3 rows Listed below.... 1: ps3dec.exe decoder program (.exe) location 2: Folder Location for your new decrypted games 3: path to location of your Batch file & Encrypted roms which will be decrypted @echo off set path2ps3dec=C:\Users\darre\Desktop\TEMPPS3\PS3DEC\ps3dec.exe set decryptedISOFolder=C:\Users\darre\Desktop\TEMPPS3\DECRYPTED_GAMES\ set path=C:\Users\darre\Desktop\TEMPPS3\PS3DEC\ setlocal EnableDelayedExpansion Set key= for %%f in (*.iso) do ( set keyFile=%%~dpnf.dkey set /p key=< "!keyFile!" echo key file: !keyFile! echo key=: !key! start "" /w /d "%path%" "%path2ps3dec%" d key !key! "%%~dpnxf" "%decryptedISOFolder%%%f" ) pause 🥳 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.