Hi @Kumar, Saravana ,
Please see this link:
https://learn.microsoft.com/en-us/dotnet/framework/data/adonet/connection-string-syntax#windows-authentication
We recommend using Windows Authentication (sometimes referred to as integrated security) to connect to data sources that support it.
So this is why I want you to add Trusted_Connection=Yes.
According to your script, the SQL authentication method is created by default. And I also did a test. You can check whether the SQL authentication method is selected by default in the configuration window after running your script.
And in this case, the changes you make will also fail when you test the connection. So the registry will not be changed.
then If I execute the script , UI checkbox enable\disable started working based on script values.
So I suggest to choose the windows authentication mode, that is, use the command I posted before.
Best regards,
Seeya
If the answer is the right solution, please click "Accept Answer" and kindly upvote it.