D-Link Forums

Software => D-ViewCam => Topic started by: arthurlin43 on October 10, 2017, 06:47:28 PM

Title: Run as Windows Service
Post by: arthurlin43 on October 10, 2017, 06:47:28 PM
There is a check box in the Systems Setting - Startup page.  However it is grayed out.

Is there a way to enable this feature?

From time to time my Windows 10 host may reboot - and DCS-100 won't run until I login.  It would be really nice to be able to start main console automatically.

ps,
I'm running version 4.2.1.
Title: Re: Run as Windows Service
Post by: FurryNutz on October 11, 2017, 10:38:15 AM
What version of DVC do you have installed?
Title: Re: Run as Windows Service
Post by: arthurlin43 on October 11, 2017, 04:25:13 PM
I'm using DVC version 4.2.1.
Title: Re: Run as Windows Service
Post by: FurryNutz on October 29, 2017, 12:30:56 PM
I don't believe there is a service feature supported with DVC...i know it starts automatically after log in which can be disabled...
Title: Re: Run as Windows Service
Post by: Red90 on October 31, 2017, 08:28:37 AM
Sure there is a "run as service" feature....  It will start it up before you log in.  Works fine for me.  You need to have the auto login enabled.
Title: Re: Run as Windows Service
Post by: FurryNutz on October 31, 2017, 09:33:57 AM
Are you referring to a Service feature of DVC that can be enabled or just enable auto log in for the PCs users account to let the program auto start?
Title: Re: Run as Windows Service
Post by: Red90 on October 31, 2017, 11:50:45 AM
There is a run as service feature.  With this turned on, along with the auto login (within DVC, not Windows), the main console and recording will start when the computer is turned on and nobody is logged into Windows.  You do not need to setup Windows to auto logon to an account for this to work.  You do not need to disable UAC.
Title: Re: Run as Windows Service
Post by: Red90 on October 31, 2017, 12:13:24 PM
It must be a new feature with 4.2.1  I can't find a manual for the program for the new version that shows the feature.  Nothing like no documentation to make life simple.
Title: Re: Run as Windows Service
Post by: FurryNutz on October 31, 2017, 12:50:45 PM
Awesome. Thank for you for confirming this.
Title: Re: Run as Windows Service
Post by: Red90 on October 31, 2017, 07:27:13 PM
Here is the main setup screen that shows the new options.  No idea why it did not make it to the new manual.

(http://red90.ca/rovers/dvcam.jpg)
Title: Re: Run as Windows Service
Post by: FurryNutz on October 31, 2017, 07:31:29 PM
Thanks for posting. I can confirm this as well.

Possible it got over looked...
Title: Re: Run as Windows Service
Post by: GreenBay42 on November 01, 2017, 07:02:38 AM
The latest manual (4.20) was for version 4.1.1. I will send a request for an update.
Title: Re: Run as Windows Service
Post by: FurryNutz on November 01, 2017, 09:41:12 AM
Thank you.  ;)
Title: Re: Run as Windows Service
Post by: arthurlin43 on November 06, 2017, 09:47:04 AM
This is what happened in my settings.  Like I said in the initial post - the "Run as Windows Service" being grayed out.
https://ppt.cc/fS9Zhx
(https://ppt.cc/fS9Zhx)

Any idea why?
Title: Re: Run as Windows Service
Post by: GreenBay42 on November 06, 2017, 09:54:32 AM
Did you run D-ViewCam as administrator? Let me install it and see if I can duplicate the issue.
Title: Re: Run as Windows Service
Post by: FurryNutz on November 06, 2017, 10:12:30 AM
Ya I believe you need admin rights. Mines installed on a Windows 7 x32 PC and the check box is selectable for me.
Title: Re: Run as Windows Service
Post by: GreenBay42 on November 06, 2017, 10:18:42 AM
Me too. I cannot make it grayed out.

arthurlin - are you logged in dviewcam as "admin" or did you create users and using a different account?
Title: Re: Run as Windows Service
Post by: arthurlin43 on November 06, 2017, 01:35:21 PM
My system is a freshly installed Windows 10.0.15063 - perhaps there are something specific to the OS version.

From windows user - I have one and only user with admin right.  I have created an user account for Dview called "admin" with a password - this is supplied in the "Auto-Login" SETUP section.

I have also tried to uninstall/re-install Dview that has no apparent value.   I cannot remember if I have done "Run As Administrator" to install Dview (most likely not) but it has enough privilege to install Dview and Device pack and C run time etc.

During my attempt to re-install - I have started the installer with "Run as Administrator" that doesn't seem to make any difference.

I have also stop MainConsole.exe (exit from console) - and tried to start Dview from Windows Start menu with "Run As Administrator" that doesn't appear to make any difference either.
Title: Re: Run as Windows Service
Post by: FurryNutz on November 06, 2017, 01:37:13 PM
Can you log in to this Windows with the actual Administrator account and see if there is any differences?
Title: Re: Run as Windows Service
Post by: GreenBay42 on November 06, 2017, 03:14:30 PM
If you log into dviewcam as admin, Click the Settings icon (wrench) > Setting > User Account Setting. Click on the admin account and click the Privilege tab. Are there any items unchecked?
Title: Re: Run as Windows Service
Post by: arthurlin43 on November 07, 2017, 07:39:47 AM
Thank you for staying with me on this seemingly impossible problem.

I managed to disable UAC - after reboot and re-install as an administrator - the behavior remains the same.  The choice is still grayed out.

A quick observation - the reinstall does not seem to be the same as a fresh install.  For one thing the new install picks up my  camera/storage/password settings - so there are some residual effects from the last installation.  Maybe that is causing all my tests that the installs haven't gone back to setup the run as service properly.



Title: Re: Run as Windows Service
Post by: Red90 on November 07, 2017, 08:37:30 AM
Try changing some options and see if it comes to life.  Try and match my screenshot.
Title: Re: Run as Windows Service
Post by: FurryNutz on November 07, 2017, 09:25:34 AM
Can you log in to this Windows with the actual Administrator account and see if there is any differences?

Thank you for staying with me on this seemingly impossible problem.

I managed to disable UAC - after reboot and re-install as an administrator - the behavior remains the same.  The choice is still grayed out.

A quick observation - the reinstall does not seem to be the same as a fresh install.  For one thing the new install picks up my  camera/storage/password settings - so there are some residual effects from the last installation.  Maybe that is causing all my tests that the installs haven't gone back to setup the run as service properly.
Title: Re: Run as Windows Service
Post by: arthurlin43 on November 07, 2017, 10:56:20 AM
Can you log in to this Windows with the actual Administrator account and see if there is any differences?

On the Windows 10 machine - I have only one user account that has the administrator role.
Title: Re: Run as Windows Service
Post by: FurryNutz on November 07, 2017, 10:58:23 AM
Try this...
https://www.ghacks.net/2014/11/12/how-to-enable-the-hidden-windows-10-administrator-account/ (https://www.ghacks.net/2014/11/12/how-to-enable-the-hidden-windows-10-administrator-account/)
Title: Re: Run as Windows Service
Post by: FurryNutz on November 07, 2017, 11:03:48 AM
I'm loading up my Windows 10 PC now and will try this out...
Title: Re: Run as Windows Service
Post by: arthurlin43 on November 07, 2017, 11:20:57 AM
Made no difference -

I have done

net user Administrator /active:yes
logout
login in (as Administrator)
  windows prepare the user for the first time ...

Check MainConsole.exe - System settings - the "Run as Windows Service" is still grayed out.

Uninstall from control panel/application

Install D-view and look at MainConsole again - "Run as Windows Service" is still grayed out.

Title: Re: Run as Windows Service
Post by: FurryNutz on November 07, 2017, 11:25:06 AM
Ok, just confirmed this as well. I'm not getting the service enabled on mine either. Both User with Admin and full Administrator account in Windows 10:
(https://preview.ibb.co/jzNV0w/DVC_Windows10.png) (https://ibb.co/eaJ3Lw)

Ran install from user account with admin and set install to run with Admin rights.
Title: Re: Run as Windows Service
Post by: arthurlin43 on November 07, 2017, 02:10:08 PM
If you bang the head against the wall hard enough, sometimes it works.

I was fussing around and noticed something in the D-view's installed directory.

C:\Program Files (x86)\D-Link\D-ViewCam\LoaderService>dir
 Volume in drive C has no label.
 Volume Serial Number is A811-D24D

 Directory of C:\Program Files (x86)\D-Link\D-ViewCam\LoaderService

11/08/2017  03:16 AM    <DIR>          .
11/08/2017  03:16 AM    <DIR>          ..
07/14/2016  02:03 PM                45 install.bat
07/14/2016  02:03 PM           399,872 LoaderServiceSetup.msi
06/19/2017  07:42 PM           480,208 setup.exe
07/14/2016  02:03 PM                47 uninstall.bat
               4 File(s)        880,172 bytes
               2 Dir(s)  155,298,811,904 bytes free

Just for kicks - I ran the "install.bat" from command prompt with "Administrators".

This created a "LoaderService" in the Windows Service control panel.   Surprisingly - this "Run as Windows Service" is now selectable.

Very amazing.  I am officially happy.
Title: Re: Run as Windows Service
Post by: FurryNutz on November 07, 2017, 02:55:33 PM
Thanks for the find. I can confirm this. I guess in Windows 10, that service installer is not being ran upon main installation. I'll have D-Link check on that.  ;)
Title: Re: Run as Windows Service
Post by: GreenBay42 on November 08, 2017, 07:46:27 AM
Thanks for the find. I am glad you found the issue cuz it was bugging me. I will let tech support know and maybe better installation instructions can be included with the software download.
Title: Re: Run as Windows Service
Post by: Datre on December 29, 2017, 04:39:43 PM
For me (Windows 8.1 64bits), the method of arthurlin43 (http://forums.dlink.com/index.php?topic=72613.msg291663#msg291663) did not work properly.
I had to run LoaderServiceSetup.msi as administrator (install.bat was not enough). Then, I ticked the box "Run a Windows Service", but at startup Windows, Monitor launched anyway asking for a privilege elevation. The service did not seem to start.

I used another method that worked the first time:
- Launch LoaderServiceSetup.msi and uninstall.
- Download NSSM v2.24 (https://nssm.cc/)
- Copy of nssm.exe into C:\Program Files (x86)\D-Link\D-ViewCam
- As administrator, run nssm.exe install D-ViewCam (We can put a name other than D-ViewCam).
- In path, indicate where MainConsole.exe is located
(https://i.imgur.com/oEm401O.png)

We can also put the service in delayed start.
(https://i.imgur.com/Q09pPwo.png)
To create the service, click on "Install service"

Start the task manager. Boot tab, select D-ViewCam (if present) and disable it.
(https://i.imgur.com/veI8Ec8.png)

Finally, either start the D-ViewCam service in the service manager or reboot.
Title: Re: Run as Windows Service
Post by: Red90 on December 30, 2017, 07:06:35 AM
When I run it as a service, the main console starts to run before you log in, so there is no need or possibility for it to ask for elevated privileges.  You do not need to do any of the things you describe.

FYI, it does not actually "run as a service".  It simply starts the main console PROGRAM when the computer is booted up, before logging in.  It is not a service, but a normal program.
Title: Re: Run as Windows Service
Post by: besweeet on September 13, 2018, 07:53:43 PM
When I enable "run as Windows service," Main Console doesn't start upon login. There is no EXE in Task Manager that represents it. I've already added a shortcut to MainConsole.exe in my startup folder. I simply want it to start upon login. There's only one Windows account on the machine.
Title: Re: Run as Windows Service
Post by: FurryNutz on September 14, 2018, 08:16:50 AM
Have you tried the service method suggested by Datre?

When I enable "run as Windows service," Main Console doesn't start upon login. There is no EXE in Task Manager that represents it. I've already added a shortcut to MainConsole.exe in my startup folder. I simply want it to start upon login. There's only one Windows account on the machine.
Title: Re: Run as Windows Service
Post by: besweeet on September 14, 2018, 08:18:51 AM
Have you tried the service method suggested by Datre?

Not yet. I figured the built-in "run as Windows service" feature would work as you think it would. Will give it a shot later.
Title: Re: Run as Windows Service
Post by: FurryNutz on September 14, 2018, 08:21:50 AM
What version of DVC are you using?
What version of Windows and platform?
Title: Re: Run as Windows Service
Post by: besweeet on September 14, 2018, 08:22:41 AM
What version of DVC are you using?
What version of Windows and platform?

4.2.1 on a clean install of of Windows 10 Pro x64 (all available updates have been installed).
Title: Re: Run as Windows Service
Post by: GreenBay42 on September 14, 2018, 08:57:41 AM
Run as windows service will not launch it, it only runs it in the background when the computer is booted.

Under settings > General > Startup make sure Main Console is checked. This will launch it after you log in.
Title: Re: Run as Windows Service
Post by: besweeet on September 14, 2018, 04:44:35 PM
Run as windows service will not launch it, it only runs it in the background when the computer is booted.

Under settings > General > Startup make sure Main Console is checked. This will launch it after you log in.

Perfect! I've disabled the service checkbox and enabled the Main Console checkbox and it's launching upon login like I'm wanting. Thanks.
Title: Re: Run as Windows Service
Post by: FurryNutz on September 14, 2018, 06:35:37 PM
Enjoy.  ;)
Title: Re: Run as Windows Service
Post by: Red90 on November 21, 2018, 07:17:10 AM
When it is set as "run as service", it starts before logon, but also stays running after logon.  You can open it after logon by right clicking the icon on the taskbar.  I've been running this way for a long time.
Title: Re: Run as Windows Service
Post by: FurryNutz on November 26, 2018, 02:11:34 PM
 ;)