mRemoteNG icon indicating copy to clipboard operation
mRemoteNG copied to clipboard

Cannot select default connection file on startup

Open David-Houser opened this issue 1 year ago • 4 comments

I am unable to select a default connection file to open on startup.

I have tried adding the /c: and /cons: parameters, but these do not work.

“C:\Program Files (x86)\mRemoteNG\mRemoteNG.exe” /c:”C:\OneDrive\path\to\config.xml"

There does not seem be an option for this in the mRemote application.

Am I missing something? Is this possible in the current version? I'm using build 1.77.3 (Nightly Build; 1784)

Thank you,

David-Houser avatar Feb 07 '24 15:02 David-Houser

Version 1.77.3-nb does not save settings as it's disabled due to development process in the settings saving section. If you want persistent settings, you currently have to use 1.77.2-nb.

simonai1254 avatar Feb 07 '24 16:02 simonai1254

Understood, thank you.

David-Houser avatar Feb 07 '24 17:02 David-Houser

If somebody wants to test the dev builds with cons param, I made an ugly hack for myself and modified the following line:

https://github.com/mRemoteNG/mRemoteNG/blob/6e64b0925693b1f4d86a24a950bb7d1e6e480e3a/mRemoteNG/App/Runtime.cs#L102

from:

 ConnectionsService.LoadConnections(Properties.OptionsDBsPage.Default.UseSQLServer, false, connectionFileName);

to:

 if (Properties.OptionsBackupPage.Default.LoadConsFromCustomLocation && File.Exists(Properties.OptionsBackupPage.Default.BackupLocation))
 {
     connectionFileName = Properties.OptionsBackupPage.Default.BackupLocation;
     ConnectionsService.LoadConnections(Properties.OptionsDBsPage.Default.UseSQLServer, false, connectionFileName);
 }
 else
 {
     ConnectionsService.LoadConnections(Properties.OptionsDBsPage.Default.UseSQLServer, false, connectionFileName);
 }

And now I can load my cons file from somewhere.

cocoon avatar Mar 28 '24 10:03 cocoon