I'm trying to copy a new CACerts file over after I've installed Java. I added both a PostScript powershell and the path to the CACerts file in Additional files.
I can see in the logs that the script that I've specified is running, but I can't get it to find the CACerts file in the additional files. Is there a variable I need to be using?
I currently have this.
Copy-Item -Path "$PSScriptRoot\cacerts" -Destination "C:\Program Files (x86)\Java\jre1.8.0_361\lib\security\cacerts" -Force
Hello, is it possible for you to upload a screenshot? I'd be interested to see the post script window as you have it configured in Patch My PC. If you don't want to upload here, feel free to open a case and email
[email protected].
Thanks! I removed the screenshot because it wasn't properly redacted. The way you have this set up, it should work. Is this ConfigMgr or Intune? Are you able to see that both the script and the additional file are both included in the content.
The logs say that they find the powershell and run it. I don't have much error handling in it right now. I'm just trying to get it to copy the file to the target computer and I don't know the syntax to reference the post script location. I'm currently trying something like this.
Copy-Item -Path ".\cacerts" -Destination "C:\Program Files\Java\jre1.8.0_361\lib\security\cacerts"
Hey, I just realized, is the issue that the destination path doesn't exist? I see your script specifically is attempting to copy the file to jre1.8.0_361, when the latest java is 371.
Good call. My initial testing was with 361. I'll update and test again.