The writeprivateprofstring Command

writeprivateprofstring is a general purpose script command that writes to (or deletes from) an agent side database, specifically to the registry under the PDB registry path, as well as to the pdb.ini file.

Important: writeprivateprofstring is a powerful script. Use with caution.

Syntax

Write scripts using the following syntax:



writeprivateprofstring section [key] [value]
			

Where:

  • section is the name of the section in the .ini file to which the value will be written. If the section does not exist, it will be created. The name of the section is case-sensitive.
  • key is the name of the key. If the key does not exist in the specified section, it will be created. If this parameter is not entered, the entire section (including all entries within it) will be deleted.
  • value is the string to be written to the file. If this parameter is not entered, the key will be deleted.
Note: Use quotation marks if either the key or value contain spaces.

Examples

Description Example Supported on
To change a device's name writeprivateprofstring Device DeviceName MyDevice
  • All
To change the orientation of the display image of a device that is remote controlled. writeprivateprofstring RcOrientationFix manufacturer model value

Where

  • manufacturer is from android.os.Build.MANUFACTURER("ro.product.manufacturer") and falling back to android.os.Build.BRAND("ro.product.brand") if the manufacturer is unknown
  • modelis from android.os.Build.MODEL("ro.product.model")
  • value is one of the following:
    • CW for clockwise
    • CCW for counter-clockwise
    • NONE for no rotation
    • UPSIDEDOWN for upside-down
  • Android
To set the minimum WiFi security level on a device writeprivateprofstring DeviceFeature MinimumWifiSecurityLevel securityLevel apply featurecontrol

Where securityLevel is one of the following values:

  • 0 sets the WiFi security level to Open
  • 1 sets the WiFi security level to WEP
  • 2 sets the WiFi security level to WPA
  • 3 sets the WiFi security level to EAP LEAP
  • 4 sets the WiFi security level to EAP FAST
  • 5 sets the WiFi security level to EAP TTLS
  • 6 sets the WiFi security level to EAP TLS
  • Android Enterprise