'Set connectionType to "Local" or "Cloud" connectionType = "Cloud" Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.OpenTextFile("C:\Program Files\SmartDeploy\ClientService\ClientConfig.json", 1) strText = objFile.ReadAll objFile.Close If connectionType = "Local" Then strText= Replace(strText, Chr(34) + "ConnectionType" + Chr(34) + ": 2,", Chr(34) + "ConnectionType" + Chr(34) + ": 1,") End If If connectionType = "Cloud" Then strText= Replace(strText, Chr(34) + "ConnectionType" + Chr(34) + ": 1,", Chr(34) + "ConnectionType" + Chr(34) + ": 2,") End If Set objFile = objFSO.OpenTextFile("C:\Program Files\SmartDeploy\ClientService\ClientConfig.json", 2) objFile.WriteLine strText objFile.Close