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

PowerShell 5.0 icon

A refactored and updated version of the P6config.cmd script below allows for multiple profiles, both Local and Roaming. 


@echo off
setlocal enabledelayedexpansion
for %%A in (Local Roaming) do (
	set profpath=C:\Users\%username%\AppData\%%A\Oracle\Primavera P6\P6 Professional\18.8.0
	if exist !profpath! goto subroutine
	rem echo !profpath! does not exist.
	rem echo return
goto eof

copy "C:\Program Files\Oracle\Primavera P6\P6 Professional\18.8.0\Data\PrmBootStrapV2.xml" "!profpath!" /y 
powershell (Get-ChildItem '!profpath!\PrmBootStrapV2.xml').CreationTime = $(Get-Date) 
powershell (Get-ChildItem '!profpath!\PrmBootStrapV2.xml').LastAccessTime = $(Get-Date) 
powershell (Get-ChildItem '!profpath!\PrmBootStrapV2.xml').LastWritetime = $(Get-Date)
goto return


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.