Copy link to clipboard
Copied
I would like to develop a method of ensuring all users are working with the same Color Settings. We have many users working on many different computers so manually setting these is out of the question. With Windows 7, I have created a .bat script to copy 'Color Settings.csf' from a correct set up on user logon (C:\Users\%Username%\AppData\Roaming\Adobe\Adobe Photoshop CS6\Adobe Photoshop CS6 Settings). This works some of the time, but not always as I will find users working outside of our standard - and they did not alter it manually. I have also tried creating a custom 'Color Setting' and loading that in the appropriate user App Data location. Doing so allows the user to select this custom setting but does not force it to the active state automatically.
Currently I use a .bat to build a profile tree if one does not exist and copy over the 'Color Settings.csf' file to the designated folder in the profile tree (C:\Users\%Username%\AppData\Roaming\Adobe\Adobe Photoshop CS6\Adobe Photoshop CS6 Settings). From past research this is the file that manipulates the areas I wish to align (mentioned below).
However this method does not always work. the file copies over but it seems that simply dropping 'Color Settings.csf' file does not 100% guarantee that the user will have the settings:
Script:
if not exist "C:\Users\%Username%\AppData\Roaming\Adobe\Adobe Photoshop CS6\Adobe Photoshop CS6 Settings" mkdir "C:\Users\%Username%\AppData\Roaming\Adobe\Adobe Photoshop CS6\Adobe Photoshop CS6 Settings"
set "src=\\Server\Source_Path\Color_Source"
set "dest=C:\Users\%Username%\AppData\Roaming\Adobe\Adobe Photoshop CS6\Adobe Photoshop CS6 Settings"
xcopy /y "%src%" "%dest%"
I found 2 ways of doing it in ExtendScript. You can also run it from inside of Photoshop, or from Terminal.
Save one of the following 2 scripts as a .jsx file (I called mine "setColorSettings.jsx").
Option 1
This is probably the best option since it doesn't have a reference to a file on the users local setup. It will set all the properties you mentioned above.
...setColorSettings();
function setColorSettings() {
var desc = new ActionDescriptor();
var ref = new ActionReference();
ref.putPropert
Copy link to clipboard
Copied
I found 2 ways of doing it in ExtendScript. You can also run it from inside of Photoshop, or from Terminal.
Save one of the following 2 scripts as a .jsx file (I called mine "setColorSettings.jsx").
Option 1
This is probably the best option since it doesn't have a reference to a file on the users local setup. It will set all the properties you mentioned above.
setColorSettings();
function setColorSettings() {
var desc = new ActionDescriptor();
var ref = new ActionReference();
ref.putProperty( charIDToTypeID( "Prpr" ), stringIDToTypeID( "colorSettings" ) );
ref.putEnumerated( charIDToTypeID( "capp" ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) );
desc.putReference( charIDToTypeID( "null" ), ref );
var colorSettingsDesc = new ActionDescriptor();
colorSettingsDesc.putString( stringIDToTypeID( "workingRGB" ), """sRGB IEC61966-2.1""" );
colorSettingsDesc.putEnumerated( stringIDToTypeID( "policyRGB" ), stringIDToTypeID( "policy" ), charIDToTypeID( "Cnvr" ) );
colorSettingsDesc.putBoolean( stringIDToTypeID( "askMismatchOpening" ), true );
colorSettingsDesc.putBoolean( stringIDToTypeID( "askMismatchPasting" ), true );
colorSettingsDesc.putBoolean( stringIDToTypeID( "askMissing" ), true );
desc.putObject( charIDToTypeID( "T " ), stringIDToTypeID( "colorSettings" ), colorSettingsDesc );
executeAction( charIDToTypeID( "setd" ), desc, DialogModes.NO );
}
Option 2
This script makes a reference to a file on the users local setup ("/Users/javier/Desktop/test.csf"). Replace this string with your "Color Settings.csf" path.
loadColorSettings();
function loadColorSettings() {
var desc = new ActionDescriptor();
var ref = new ActionReference();
ref.putProperty( charIDToTypeID( "Prpr" ), stringIDToTypeID( "colorSettings" ) );
ref.putEnumerated( charIDToTypeID( "capp" ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) );
desc.putReference( charIDToTypeID( "null" ), ref );
var colorSettingsDesc = new ActionDescriptor();
colorSettingsDesc.putPath( charIDToTypeID( "Usng" ), new File( "/Users/javier/Desktop/test.csf" ) ); //<-- Replace path with JSX script file path
desc.putObject( charIDToTypeID( "T " ), stringIDToTypeID( "colorSettings" ), colorSettingsDesc );
executeAction( charIDToTypeID( "setd" ), desc, DialogModes.NO );
}
If you don't want the user to run a script from inside of Photoshop, but prefer to run something from Terminal, you can execute the above JSX script file from the correct target application. In my case it was "Adobe Photoshop CC 2015". I'm on MacOS, so I can't guarantee the Windows commands will work.
MacOS / Windows? (untested)
open -a "Adobe Photoshop CC 2015" "/Users/javier/Desktop/setColorSettings.jsx"
MacOS
osascript -e 'tell application "Adobe Photoshop CC 2015" to do javascript "#include /Users/javier/Desktop/setColorSettings.jsx"'
Windows (untested)
photoshop.exe "C:\Users\javier\Desktop\setColorSettings.jsx"
Hope this helps.
Copy link to clipboard
Copied
Javier,
This seems promising and is certainly closer to the solution we need.
For anyone that is curious how to implement this on Windows 7:
Create a .bat script to call Photoshop and run the .jsx provided above.
This will launch Photoshop with the settings the javascript determines.
Copy link to clipboard
Copied
You will also have to control Scripts and Actions allow on your machine and find a way to disable Edit Color Settings... otherwise user will change color settings.