Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub CheckMachineName()
- Try
- Dim JunkVariable = My.Settings.conDobAlerts ' need to access settings data just once before we can iterate through the settings
- If My.Computer.Name = "ASERVER" Then
- Console.WriteLine("Changed connection string to use localhost")
- For Each setting As Configuration.SettingsPropertyValue In My.Settings.PropertyValues
- Try
- My.Settings.Item(setting.Name) = setting.PropertyValue.ToString.Replace("jjahost.dyndns.org,1533", "localhost")
- Catch ex As Exception
- Console.WriteLine("Couldn't change setting " & setting.Name)
- End Try
- Next
- End If
- Catch ex As Exception
- Throw ex
- End Try
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement