Jump to content
LaunchBox Community Forums

PS3: Looking to Create a Batch file to Decrypt ISOs with PS3dec when launching a game. Then delete the decrypted PS3 file on QUIT.


darreldearth

Recommended Posts

17 minutes ago, phunky1 said:

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

 

ok so I GOT IT WORKING! i tried this to see my execution policy and it was restricted so set it to Unrestricted using this command Set-ExecutionPolicy Unrestricted according to online

image.png.11ceb7cf147b8cae40752680e29e74d7.png

Afterwards I was able to run the script but i have to tell it to allow it each time but it still worked!!!!!

image.thumb.png.5b67a4406718272b36cec001df93b9d7.png

Link to your script for anyone else looking to use it! 

https://github.com/ptmorris1/RPCS3-ISOLauncher-Launchbox/blob/master/Bulk-Decrypt-ISOs.ps1

 

So now both scripts work beautifly as far as i can tell😁. So everyone now has 2 ways to batch convert their ISOs incase one doesnt work for anyone thanks to you both @phunky1 & @JoeViking245. Thanks so much for the help!

 

  • Like 2
Link to comment
Share on other sites

5 minutes ago, darreldearth said:

 

ok so I GOT IT WORKING! i tried this to see my execution policy and it was restricted so set it to Unrestricted using this command Set-ExecutionPolicy Unrestricted according to online

 

Nice, updated one more bug I found in script if you end up using.  I think if you restart your powershell console it won't ask for the check after every run now that you set your execution policy.  Or try PowerShell -ExecutionPolicy Bypass -File c:\script.ps1  but glad you have both working. 

 

Nice work also @JoeViking245 for not having any PS3 ISO to test with!

  • Thanks 2
Link to comment
Share on other sites

16 minutes ago, phunky1 said:

Nice, updated one more bug I found in script if you end up using.  I think if you restart your powershell console it won't ask for the check after every run now that you set your execution policy.  Or try PowerShell -ExecutionPolicy Bypass -File c:\script.ps1  but glad you have both working. 

 

Nice work also @JoeViking245 for not having any PS3 ISO to test with!

Awesome!😁 yeah the new version worked perfectly too with no problems thanks! 

Sorry one last thing lol... 

For the code you posed Below for your RPCS3-Decrypt-ISO-LaunchBox script you made is there a way to have the decrypted file be decrypted anywhere other than where the Original Encrypted file is located? Here's your original script below for reference (However, If its to much work adding a custom location then no worries, just figured it might be slightly faster saving the decrypted file to my computer rather than back to the NAS Server where the Encrypted files are)

# Will get ISO param from Launchbox
param (
    [Parameter(Mandatory = $true)]
    [string]$ISOpath
)

# Put script in same folder as rpcs3.exe or change to direct path.
$RPCS3path = "$PSScriptRoot\rpcs3.exe"
#Path to PS3DEC.exe
$PS3DEC = "$PSScriptRoot\ps3dec\PS3Dec.exe"
#path to disc key files for decryptions
$KeysPath = "C:\Roms\Sony Playstation 3\_PS3 Downloading\DKeys"

$Keys = Get-ChildItem $KeysPath
$ISOname = [System.IO.Path]::GetFileNameWithoutExtension($ISOpath)
$Key = $Keys | Where-Object -Property name -Like "$ISOname*"
$KeyValue = Get-Content $key.FullName
$DecryptISO =  (Split-Path $ISOpath -Parent) + "\$ISOname" + "_DEC.iso"

& $PS3DEC d key $KeyValue $ISOpath $DecryptISO | Out-Null

# Mounts the ISO to a drive letter
$Vol = Mount-DiskImage -ImagePath $DecryptISO -PassThru
# sleeps 2 seconds to wait for disk to mount.  Can be changed as needed.
Start-Sleep -Seconds 2
# Then gets the drive letter that the ISO was mounted to.
$Voldisk = $vol | Get-Volume
# Created the $path variable to the EBOOT.BIN file for lanching in rpcs3
$path = $Voldisk.DriveLetter + ':\PS3_GAME\USRDIR\EBOOT.BIN'
# Lanches rpcs3 with EBOOT.BIN path, can add extra arguments for rpcs3.exe if needed.  Not tested in this script.
& $RPCS3path $path
# sleeps 2 seconds until rpcs3 has a chance to start
Start-Sleep -Seconds 2
# Waits for rpcs3 to be closed
Wait-Process rpcs3
# Dismounts the ISO image drive
Dismount-DiskImage -ImagePath $DecryptISO
Remove-Item $DecryptISO -Force

 

Link to comment
Share on other sites

2 hours ago, darreldearth said:

Awesome!😁 yeah the new version worked perfectly too with no problems thanks! 

Sorry one last thing lol... 

For the code you posed Below for your RPCS3-Decrypt-ISO-LaunchBox script you made is there a way to have the decrypted file be decrypted anywhere other than where the Original Encrypted file is located? Here's your original script below for reference (However, If its to much work adding a custom location then no worries, just figured it might be slightly faster saving the decrypted file to my computer rather than back to the NAS Server where the Encrypted files are)

heheheh, no worries nice to see someone using it so I assume some one else might as well.  Updated the script on github, need to change the $decryptpath = '' in the script to custom location.  remove leading \  so just 'd:' or 'd:\isopath'

Edited by phunky1
grammar
Link to comment
Share on other sites

@phunky1 The updated Script works Great😁! thanks So Much! Great being able to have it decode somewhere other than on the NAS server lol😅, also seems to work a slightly faster but that could just be in my head lol, kuz even with a 12900k CPU i still think the CPU bottlenecks the Hard drives read/write speed lol, but without more testing i could be wrong. But thanks for spending so much time on the script it works great!

Link to comment
Share on other sites

  • 1 year later...

Sorry to resurrect an older thread but I think this has what I am looking for. I have a few questions if you don't me asking.

  • I have a group of ISO files currently and would like to decrypt them all into JB Folder Structure. Is this what is being done or is it creating an unencrypted iso?
  • Is RPCS3 even able to play an iso formatted file? I thought it couldn't?
  • Can the file format include the product code if we want to add it like PS3 Disc Dumper allows you to do? (i.e. BLUS31145)
  • Last question... and maybe deserving another thread, but PS3 disc dumper by 13xforever does pretty much everything I need. Problem is you have to do 1 at a time. Mount ISO, Wait for PS3 Disc Dumper to find key in database, click start to extract, when done you unmount and then repeat the process for each. Can the script provided in this thread be adapted to be used with this program? I like the idea of not having to do each manually 1 by 1.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...