$envUserProfile unexpected results for Java exceptions file?

Greetings, I’m on about my 20th deployment with PSADT, but this is vexing me. I need to copy the java exceptions.sites file from a network shared location to the logged in users appdata\locallow\sun\java\deployment\security folder.

My snippet here:

Copy-File -Path "\\networkshare\installs\Java\exception.sites" -Destination "$envUserProfile\AppData\LocalLow\Sun\Java\Deployment\security\exception.sites"
Copy-File -Path "$dirFiles\java_8u291_fixed.txt" -Destination "C:\logs\java_8u291_fixed.txt"

The second copy-file works fine, the first one is attempting to copy the file to the SYSTEM user appdata folder per the log:

[Post-Installation] :: Failed to copy file(s) in path [\\networkshare\installs\Java\exception.sites] to destination [C:\windows\system32\config\systemprofile\AppData\LocalLow\Sun\Java\Deployment\security\exception.sites]. 

The SOURCE path has been tried locally from $dirFiles too with the same result, it’s not an access-to-the-folder issue.

Any ideas?

Usually Java site Exception lists are done with Oracle methods.
something like: Java Site Exceptions List and Certificates For All Users - Windows Forum - Spiceworks

Judging by your error message, I’m assuming you are deploying with SCCM.
This means that the ONLY user profile you are affecting when PSADT runs will be for the Local System account.
No other user will get the Java site Exception list.

1 Like

Thanks. I’ve been over the enterprise docs for Java a hundred times and this isn’t covered, lol. It made sense to me that the environmental would only hit the system running the script but I found other forum references elsewhere that indicated otherwise.

I have all the other certs and such setup as in this guide. I also inherited this from a wildly overcomplicated other deployment method…whew. Thanks!