I dont believe EPM is “required”. I am using the script just find without EPM installed.
As far as DeskI settings, if you goto Query Builder of the Admin Launchpad.
Use this query:
SELECT SI_DATA FROM CI_SYSTEMOBJECTS WHERE SI_PROGID = 'CrystalEnterprise.User'
Or you can query a specific user:
SELECT SI_DATA FROM CI_SYSTEMOBJECTS WHERE SI_PROGID = 'CrystalEnterprise.User' And SI_Name = 'Administrator'
You will get a list of whatever settings are set for that user.
From there you can just add it to the script.
For Example:
Say we want to set CADENZA_SelectedView, which doesnt appear to be in the script (possibly intentional to limit query execution time)
In the script add a line to get, that says:
String sCADENZA_SelectedView = sUser.getProfileString("CADENZA_SelectedView");
And one to set:
iUser.setProfileString("CADENZA_SelectedView", sCADENZA_SelectedView);
That should do the trick. There are potentially hundereds of possible settings that can be set here which is probably why they are not all in the script.
I would set a users prefs up how you want them, the query for that users prefs, and setup the script to do just those. Even if that involves removing some of the ones that are in the script now.
Interestingly ALL prefs can be set in one step using a vbs file. Apparently the Java and .NET SDK’s are quite different.
setPrefs.vbs
'*****************************************************************
'This script will copy preferences from the user specified below
'to all other users on the system.
'This will simulate "Global Preferences"
'This script has no prompts, since it was written to be published
'and run from within BOE.
'I do suggest you disable preferences button deny rights to preferences
'if you are using this script
'Begin parameters
'*****************************************************************
Const ceUsername = "Administrator" 'This is a BO admin
Const cePassword = "" 'password for User specified above
Const ceAPSName = "cms" 'BOE CMS Name
Const ceAuthType = "secEnterprise" 'Auth Type, usually secEnterprise
const sourceUser = "administrator" 'This is the user to copy preferences FROM
AllUsers = "0" 'Set this value to 1 if you are manually running the script to set rights on all inboxes, otherwise the script will only look for users added today
Scheduled = "0" 'Set to 1 if scheduling this script in BOE this will make it run silently, otherwise use 0
'******************************************************************
'End Parameters
'Do not modify past this line (unless you know what you are doing)
'******************************************************************
dim today
today = Year(date) & "." & Month(date) & "." & Day(date)
Set ceSessionManager = CreateObject("CrystalEnterprise.SessionMgr")
Set ceSession = ceSessionManager.Logon(ceUserName, cePassword, ceAPSName, ceAuthType)
Set ceInfoStore = ceSession.Service("","InfoStore")
Set sUser = ceInfoStore.query("SELECT SI_NAME, SI_DATA FROM CI_SYSTEMOBJECTS WHERE SI_PROGID = 'CrystalEnterprise.User' And SI_Name = '"& sourceUser &"'").Item(1)
if AllUsers = "0" then
Set targetUsers = ceInfoStore.query("SELECT top 50000 SI_NAME, SI_DATA FROM CI_SYSTEMOBJECTS WHERE SI_PROGID = 'CrystalEnterprise.User' And SI_Name != '"& sourceUser &"' AND SI_CREATION_TIME >= '"& today &"'")
else
Set targetUsers = ceInfoStore.query("SELECT SI_NAME, SI_DATA FROM CI_SYSTEMOBJECTS WHERE SI_PROGID = 'CrystalEnterprise.User' And SI_Name != '"& sourceUser &"'")
end if
For each user in targetUsers
user.properties.add "SI_Data", sUser.properties("SI_Data").properties
Next
ceInfoStore.commit targetUsers
'Inform End User Script is complete
if Scheduled = "0" then
MsgBox targetUsers.count & " User(s) updated" & vbCrLf & "Done"
end if
GigaGuy (BOB member since 2007-02-13)