News:

  • October 09, 2026, 08:36:31 AM

Login with username, password and session length

Author Topic: Autostarting a password-protected project  (Read 21281 times)

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3626
  • Darth Ladder
Autostarting a password-protected project
« on: June 29, 2020, 03:38:58 PM »
I have PC's at remote sites acting as a remote access router to the Do-More and also have a local copy of DMD running with trends configured.

Occasionally, through the kindness of Microsoft or the site management the PC gets power-cycled.   I have a non-admin user logging in automagically, and I can run the PLC project by putting a shortcut to the DMD file in shell:startup (kudos on the file association working better now), but since the project is password-protected, as soon as DMD goes online, it wants a password.

I can certainly understand not defaulting to providing the PLC password from the command line, especially since it would probably have to be stored in cleartext, but I'm not sure what I can do in this scenario.  DMD will allow logging on as the default user with no password, but it still needs a blank entry at the password dialog.  I can probably configure the default user with adequate permissions for my needs, or can create a new non-default, non-God user, but I don't know if I can get past the password entry dialog itself.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3626
  • Darth Ladder
Re: Autostarting a password-protected project
« Reply #1 on: June 29, 2020, 03:44:24 PM »
A feature request related to this issue would be the ability to continuously log trends to disk-archive and then resume the same trend instead of having to have them be separate if DMD is shut down or the trend is stopped.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3626
  • Darth Ladder
Re: Autostarting a password-protected project
« Reply #2 on: July 03, 2020, 01:39:09 PM »
Anyone have any ideas about this?   Is there a way to avoid the password dialog for unattended logons?
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: Autostarting a password-protected project
« Reply #3 on: July 03, 2020, 01:42:33 PM »
Anyone have any ideas about this?   Is there a way to avoid the password dialog for unattended logons?

Not that I'm aware of.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3626
  • Darth Ladder
Re: Autostarting a password-protected project
« Reply #4 on: July 03, 2020, 01:47:04 PM »
Hmmm.   If I can get the default user (no PW required) configured with adequate permissions, then maybe I could start DMD from script and have the script type an <enter> some number of seconds after starting DMD.   How ever long it takes for the dialog to appear.

I guess that would amount to a feature request:   Have a command line switch that will skip the password dialog and log in as default.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

RBPLC

  • Hero Member
  • *****
  • Posts: 586
Re: Autostarting a password-protected project
« Reply #5 on: July 03, 2020, 04:18:13 PM »
If DMD is open, how long will trended data be saved? That is to say, if I start a trend at time zero, how many hours will the trend feature log data so that it can be downloaded for later use? Does this depend on the number of tags being trended and the number of trend views open?

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3626
  • Darth Ladder
Re: Autostarting a password-protected project
« Reply #6 on: July 03, 2020, 05:30:53 PM »
If DMD is open, how long will trended data be saved? That is to say, if I start a trend at time zero, how many hours will the trend feature log data so that it can be downloaded for later use? Does this depend on the number of tags being trended and the number of trend views open?

Not really.   Each point trended has a MB storage setting (and the default is configurable as well).   In my case, I'm not looking for true historical data, but rather the ability to look at recent operating data, and to have data already logged if the customer calls with an issue.  I can look back a few minutes, a few hours or a day or two to help troubleshoot, but not if DMD wasn't running during the time period in question.

I could log to the SD card, but some locations are H2-DM's, plus it's a lot more awkward than having the data already in the PC.   I could also use a SCADA package, since the DM's are configured as Modbus/TCP servers.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

RBPLC

  • Hero Member
  • *****
  • Posts: 586
Re: Autostarting a password-protected project
« Reply #7 on: July 03, 2020, 06:42:13 PM »
So storage is based on the MB set by the user? Where is this in the manual (topic number)? I was reading through the trend view information in the help files and apparently missed the memory allocation settings discussion.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3847
    • Host Engineering
Re: Autostarting a password-protected project
« Reply #8 on: July 04, 2020, 07:03:00 PM »
I split the discussion on Trend View Archiving to a new topic thread:
https://forum.hosteng.com/index.php?topic=3050.0

jcottrill

  • Full Member
  • ***
  • Posts: 43
Re: Autostarting a password-protected project
« Reply #9 on: July 06, 2020, 05:25:21 PM »
Hmmm.   If I can get the default user (no PW required) configured with adequate permissions, then maybe I could start DMD from script and have the script type an <enter> some number of seconds after starting DMD.   How ever long it takes for the dialog to appear.

I guess that would amount to a feature request:   Have a command line switch that will skip the password dialog and log in as default.

Hey Controls Guy,

Maybe have a look at Autoit (https://www.autoitscript.com/site/) if you are not already familiar.  It has the ability to automate Windows apps via scripting.  Might be a more robust way of sending the ENTER key as you can instruct it to wait for particular windows to appear.  Much of this depends on how the app was developed but most newer apps play well'ish in this environment.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3626
  • Darth Ladder
Re: Autostarting a password-protected project
« Reply #10 on: July 06, 2020, 05:54:06 PM »
Thanks, @jcottrill!

I was thinking Windows scripting or even WinBatch (I'm very old), but I have heard of AutoIt, and will give it a good look.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

jcottrill

  • Full Member
  • ***
  • Posts: 43
Re: Autostarting a password-protected project
« Reply #11 on: July 07, 2020, 11:35:19 AM »
WinBatch looks similar to AutoIt.  If you've already paid for the WinBatch licensing it should be a solid solution.  One advantage to AutoIt is that it is free.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3626
  • Darth Ladder
Re: Autostarting a password-protected project
« Reply #12 on: July 07, 2020, 01:25:02 PM »
Actually, free is good if I need to roll it out to multiple remote sites.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3626
  • Darth Ladder
Re: Autostarting a password-protected project
« Reply #13 on: July 07, 2020, 06:10:38 PM »
Followup:   Tried AutoIt and it works perfect.  Compiled the script to an EXE, copied that to the remote machine, didn't even install AutoIt locally, put a shortcut to the EXE in shell:startup and everything is happy!

Thanks again, @jcottrill!
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

jcottrill

  • Full Member
  • ***
  • Posts: 43
Re: Autostarting a password-protected project
« Reply #14 on: July 09, 2020, 03:10:03 PM »
No problem.  AutoIt has saved my bacon a couple times and allowed for integrating multiple systems that weren't meant to work together.