I have written a function to up date the PID Key in a config.xml file.
This is used by SharePoint during a silent install.
It works, however it is adding some additional charactors at the end of the PID that cause the install to quit.
I beleve these are white spaces and carage returns. How do I write my update to keep tis from happening?
$drv = "E"
$PIDKey = $txtBoxPID.Text
$PIDKey = $PIDKey.ToString()
$statusbar2.Text = "$PIDKey"
$xfile = "E:\SP2010_DoNotDelete\Scripts\config.xml"
$xmlData = [xml](gc $xFile)
$statusbar2.Text = "Updating config.xml"
$xmlData.Configuration.PIDKEY.Value = $PIDKey
$statusbar1.Text = "config.xml Updated"