Maintaining Consistent Primavera P6 Client Configuration Files Across Multiple Users Using PowerShell

PowerShell 5.0 icon

In setting up Oracle’s Primavera P6 EPPM version 18.8, I discovered that users who connected to the client via Citrix were not picking up changes that were made to the default configuration file.

Normally, if that file is changed and is newer than the user’s own file, it will be overwritten with the default. In this case, users were not seeing the newer file, and when I looked, they often had no local profile on the Citrix server.

As it turned out, the user profiles were set up as roaming profiles that were deleted upon logoff. This wouldn’t necessarily be a problem, except that the their copy of the config file was always listed as newer than the default.

A workaround was to be logged into the server via RDP, and to have the user log in via Citrix. At that time, the config file could be manually copied, overwriting the user’s old file, and then (most importantly!) manually opening and saving the user’s file, so that it would remain in place in their roaming profile even after logoff.

This is clearly not a feasible practice in a production environment. However, an automated script that does this could solve this problem! Save the following as a .cmd file and make sure it is run prior to running the P6 client executable.

copy "C:\Program Files\Oracle\Primavera P6\P6 Professional\18.8.0\Data\PrmBootStrapV2.xml" "C:\Users\%username%\AppData\Roaming\Oracle\Primavera P6\P6 Professional\18.8.0" /y

powershell (Get-ChildItem 'C:\Users\%username%\AppData\Roaming\Oracle\Primavera P6\P6 Professional\18.8.0\PrmBootStrapV2.xml').CreationTime = $(Get-Date)
powershell (Get-ChildItem 'C:\Users\%username%\AppData\Roaming\Oracle\Primavera P6\P6 Professional\18.8.0\PrmBootStrapV2.xml').LastAccessTime = $(Get-Date)
powershell (Get-ChildItem 'C:\Users\%username%\AppData\Roaming\Oracle\Primavera P6\P6 Professional\18.8.0\PrmBootStrapV2.xml').LastWritetime = $(Get-Date)

As long as the Citrix server has PowerShell installed, this should work.

Update: Part 2 has a script that will allow for both Local and Roaming profiles.

Examining the TransactionObject in PowerBuilder During Update and Delete

PowerBuilder logo

During the upgrade of an application from Sybase PowerBuilder 6.5 to SAP PowerBuilder 12.6, I ran into a bug in the Update event that had me suspicious that the TransactionObject was somehow changing, causing the update to be directed toward a different database.

As it turns out, the bug was due to a trigger in the main database that was selecting data from another database. 

Even so, I learned about something quite valuable: the SQLPreview event. 

event sqlpreview
this.setsqlpreview(sqlsyntax)
end event

If you set a watch on sqlsyntax, you can see the SQL code associated with the data update.

Problems with iOS 12 Beta Screen Time

iOS 12 logo

As should be obvious, putting a beta version of iOS on your primary iPhone may not be a wise choice – especially if you’re not a developer hunting for bugs. Even so, the iPhone 6s I bought for my daughter from Gazelle came with iOS 12 beta 3 loaded onto it.

iOS 12 Software Update screen

When I saw this, I was surprised, but I figured it wouldn’t be too big of a deal. However, I quickly discovered when setting up parental controls that things had changed. What was once called Restrictions, was now called Screen Time, and many things inside there were not where I expected them to be. This was, admittedly, the first time I had looked at iOS 12.

I began trying to set up Screen Time like I had restrictions on iOS 11 on her iPad. I also was able to get Disney’s Circle Go installed for additional control.

Once I thought I had everything set correctly, I tried to set up her Mail app with her Gmail account. It wouldn’t connect to Google’s accounts page for Gmail because the website was apparently blocked. I then began turning off restrictions – first Circle Go, then Screen Time. Still a no go. At this point, Safari wouldn’t even open.

I started checking to see if Screen Time in the beta had known bugs. Sure enough, it did.

At this point, I decided it was time to load iOS 11.4, so I did, with these instructions.

All is well now!