Boot-Einstellungen konfigurieren
Boot-Einstellungen wie automatischer Start mit AutoRun und automatische Anmeldung mit AutoLogon werden per ConsumeXml auf dem System-Knoten gesetzt. Sie entsprechen den Optionen im TwinCAT System-Tray und gelten für den nächsten Systemstart.
Voraussetzungen
- Eine TwinCAT-Solution ist geöffnet.
- Ggf. Administratorrechte für AutoLogon-Konfiguration.
C#-Beispiel
ITcSmTreeItem systemNode = sysManager.LookupTreeItem("TISY");
string xmlBootSettings = @"<TreeItem>
<System>
<BootSettings>
<AutoRun>true</AutoRun>
<AutoLogon>true</AutoLogon>
<LogonUserName>Administrator</LogonUserName>
<LogonPassword>MyPassword</LogonPassword>
<BootFileEncryptionType>None</BootFileEncryptionType>
</BootSettings>
</System>
</TreeItem>";
systemNode.ConsumeXml(xmlBootSettings);
// Read current settings
string currentSettings = systemNode.ProduceXml();
![]() |
|
