You can save in the BIN folder (where the GN4 applications are) a file called UserConfigDefault.xml.
When the user runs for first time a GN4 client application (and the UserConfig.xml does not exist in %AppData%\Roaming\TeraDP\GN4\ folder on Windows 10 / 8 / 7 / Vista and in c:\Documents and Settings\<user name>\Application Data folder on Windows XP / Server 2003), if the UserConfigDefault.xml exists in the BIN folder, the connection manager dialog will load the connection from that file.
The UserConfigDefault.xml gets not modified by a GN4 application if you edit connection in the dialog box: when you close the connection dialog box by clicking OK, the standard UserConfig.xml file in the standard folder is created.
The syntax of UserConfigDefault.xml is the same of UserConfig.xml.
This is an example (change URL value to something suitable for your system):
<?xml version="1.0"?>
<UserConfig
xmlns="http://www.teradp.com/schemas/GN4/1/UserConfig.xsd"
SaveUserPwd="true"
ClientSpecId="0"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Connections>
<Connection
SaveCredentials="true"
RequireLogin="true"
Domain=""
Password=""
UserName=""
Url="http://test-url/GN4/adminsrv.asmx"
Name="Editorial"/>
</Connections>
</UserConfig>
This is useful to automatically deploy pre-filled connection settings.
You can place the UserConfigDefault.xml in the Fixed\Common folder of the ClickOnce generator, and rebuild the ClickOnce package.
Please note that this works only the first time you run a GN4 application and your %appdata%\TeraDP\GN4 is empty.
Keep this in mind when testing changes to the UserConfigDefault.xml.
See also
Enable Save Credentials option on the Connection dialog