Hi @YZ_10818805
Windchill Shell is an entry point used to execute some commands. If you take a look at the following content, you may understand
===========================================================================
- The xconfmanager is a command-line utility that is used to add, remove, and modify the properties in the Windchill property files.
- You should use the xconfmanager to manipulate properties; you should not manually edit property files.
- The xconfmanager utility saves your changes in the site.xconf file and provides an option to generate updated property files using those changes.
- The site.xconf file contains changes made to Windchill property files, which starts with installation and continues with each use of the xconfmanager utility.
- The xconfmanager utility is located in a following directory.
<Windchill_install_dir>/Windchill/bin
- xconfmanager should be run from Windchill Shell. Open a command prompt and run the following to open a Windchill Shell:
windchill shell
- [OR] Windchill shell can be directly launched using Windows start menu shortcut if Windchill installed on a Windows server.
- To display xconfmanager help, execute the following command from the windchill shell:
xconfmanager -h
- To display the current settings for a property, execute the following command from the windchill shell:
xconfmanager -d <property_names>
where <property_names> is a comma-separated list of property names.
for example, xconfmanager -d wt.home or xconfmanager -d wt.home,wt.rmi.server.hostname
- To change a property value, execute the following command from the windchill shell:
xconfmanager -s <property_name>=<property_value> -t <property_file> -p
For example, set Method Server Java Max Heap:
xconfmanager -s wt.method.maxHeap=2048 -t codebase/wt.properties -p
Note: "
-t" option specified path could use slash (/) as the path separator on both Windows and Linux/Unix platforms. The following example uses slash on Windows server.
- To add an extra value to a multivalued parameter, use the following:
xconfmanager --add <property_name>=<extra_property_value> -t <property_file> -p
For example, add a new classpath entry to the Windchill classpath specified in the wt.java.classpath property:
Note:
- To remove a value from a multivalued property using the following:
xconfmanager --remove <property_name>=<property_value_being_deleted> -t <property_file> -p
For example, need to remove an JNDI Adapter from property wt.federation.org.directoryServices
xconfmanager
Note: <JNDI-ADAPTER-DELETED> will be removed from property wt.federation.org.directoryServices in wt.properties file after executing the command.
- To add changes directly to "<WT_HOME>/site.xconf" and then propagate the changes, do the following:
- To set a property value (similar to -s from a command line):
<Property name="<property_name>" overridable="true" targetFile="<property_file>" value="<value>"/>
Example:
<Property name="wt.method.maxHeap" overridable="true" targetFile="codebase/wt.properties" value="2048"/>
- To add a value (similar to --add from a command line):
<AddToProperty name="<property_name>" value="<property_value>"/>
Example:
<AddToProperty name="wt.java.classpath" value="d:\MyLibaries\somelibrary.jar"/>
<Service context="default" name="wt.vc.config.GetConfigSpecForDelegate" targetFile="codebase/service.properties">
<Option cardinality="singleton" order="1" overridable="true"
requestor="wt.epm.EPMDocument"
serviceClass="ext.ts.the.configspec.TSEPMDocGetConfigSpecForDelegate"/>
</Service>
Note: Editing
site.xconf is
not recommended, in case need to modify, remember
never escape the special characters (colon, back-slash, etc.)
- Formatting Property Value
- A property whose value contains characters might be interpreted by your shell (such as spaces and special characters). To specify such a property, escape them using the appropriate technique for the shell you are using.
- On a Windows system, you can include spaces in a value by enclosing the argument with doubles quotes. Or you can escape the space character with ^. For example, use either of the following:
-s "wt.inf.container.SiteOrganization.name=ACME Corporation"
-s wt.inf.container.SiteOrganization.name=ACME^ Corporation
- On a UNIX/Linux system, you can use single quotes or you can escape the space character with \. For example, use either of the following:
-s 'wt.inf.container.SiteOrganization.name=ACME Corporation'
-s wt.inf.container.SiteOrganization.name=ACME\ Corporation
- When including file paths in property values, use the forward slash (/) as the separator character; do not use the Windows backward slash (\) character.
On UNIX, the backward slash (\) is not valid in a file path separator. Using forward slashes (/) in file paths ensures that the property values are valid on all platforms.
- On UNIX, dollar signs are usually interpreted by shells as variable prefixes. To set a property value with a dollar symbol, use single quotes around the argument. So that the shell does not interpret it or use backslash to escape the dollar symbols. For example, use either of the following:
-s 'wt.homepage.jsp=$(wt.server.codebase)/wtcore/jsp/wt/portal/index.jsp'
Or
-s wt.homepage.jsp=\$(wt.server.codebase)/wtcore/jsp/wt/portal/index.jsp
Other than escaping arguments where the command-line shell does not misinterpret them, you should not need to escape other values to be compatible with XML or property file syntaxes. The xconfmanager escapes property names and values automatically if necessary.
- NOTES:
- A list of Windchill properties, target files, default values, synopses and descriptions can be found in the file http://<Windchill_Server>/Windchill/properties.html
- Refer to About the xconfmanager Utility in Windchill Help Center for more information
- Avoid modifying properties files directly, it will take effect, while a following xconfmanager will flush the change
- Also avoid updating xconf manually, it may bring character encoding issue, property confliction and slash \ handling issue
- When you restart your Windchill system, the resulting changes made with xconfmanager are implemented
- If an invalid option is specified in the command, com.ptc.windchill.structconf.StructConfManager: invalid option - <Option> is returned. For example, com.ptc.windchill.structconf.StructConfManager: invalid option -- D, if option -D (which does not exist) is specified incorrectly.
- xconfmanager will store current properties files to .xconf-backup folder before propagate.