Created
May 18, 2018 17:25
-
-
Save mikerodionov/443959bd92f569fdc21c1c4cd0f32d5d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$newConnection = "Data Source=DLX;Initial Catalog=K2;Integrated Security=True" | |
$installKey = Get-ItemProperty "HKLM:\SOFTWARE\SourceCode\blackpearl\blackpearl Core" | |
$configPath = $installKey.InstallDir + "Setup\Configuration.config" | |
$xml = New-Object XML | |
$xml.Load($configPath) | |
$connectionNode = $xml.configuration.configurationdatabase.add | Where-Object { $_.key -eq 'connectionString' } | |
$connectionNode.value = $newConnection | |
$xml.Save($configPath) | |
$setupExe = $installKey.InstallDir + "Setup\Setup.exe" | |
Start-Process $setupExe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment