NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Windows v
« Previous 1 … 94 95 96 97 98 … 101 Next »
Install service

 
  • 0 Vote(s) - 0 Average
Install service
VCR58
Offline

Posting Freak

Marion Iowa, USA
Posts: 1,843
Threads: 177
Joined: Aug 2016
#1
2019-10-18, 04:41 AM
Tried the latest build but the service was not created when I ran installservice.bat as admin and got this message...

C:\WINDOWS\system32>echo OFF

adding firewall rules...
starting service...
The service name is invalid.

More help is available by typing NET HELPMSG 2185.

will start web app setting soon...please wait

For one thing, in the bat file part of line 8 has a syntax error which creates an incorrect firewall rule
program="installpath%Client\NextPVR.exe" enable=yes > nul

So I changed it to...
program="%installpath%NextPVR.exe" enable=yes > nul

The firewall rule was fixed but it still gave me the error message.
After messing with the bat file I got it to work by changing the last bit of line 12 from ">nul" to "> nul" 

I attached the modified file that works for me.


Attached Files
.zip   installservice_modified.zip (Size: 865 bytes / Downloads: 8)
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,661
Threads: 767
Joined: Nov 2003
#2
2019-10-18, 04:50 AM
(2019-10-18, 04:41 AM)VCR58 Wrote: Tried the latest build but the service was not created when I ran installservice.bat as admin and got this message...

C:\WINDOWS\system32>echo OFF

adding firewall rules...
starting service...
The service name is invalid.

More help is available by typing NET HELPMSG 2185.

will start web app setting soon...please wait
Have you already installed the service? ie, you don't need to reinstall it with each release.


Quote:For one thing, in the bat file part of line 8 has a syntax error which creates an incorrect firewall rule
program="installpath%Client\NextPVR.exe" enable=yes > nul

So I changed it to...
program="%installpath%NextPVR.exe" enable=yes > nul
nextpvr.exe is not in the same directory as NextPVRServer.exe. It's in a 'client' subdirectory.

Quote:The firewall rule was fixed but it still gave me the error message.
After messing with the bat file I got it to work by changing the last bit of line 12 from ">nul" to "> nul" 

I attached the modified file that works for me.
Oops. Right you are. I've updated the Windows zip file to include this extra space in this batch file.
VCR58
Offline

Posting Freak

Marion Iowa, USA
Posts: 1,843
Threads: 177
Joined: Aug 2016
#3
2019-10-18, 05:38 AM
(2019-10-18, 04:50 AM)sub Wrote:
Quote:For one thing, in the bat file part of line 8 has a syntax error which creates an incorrect firewall rule
program="installpath%Client\NextPVR.exe" enable=yes > nul

So I changed it to...
program="%installpath%NextPVR.exe" enable=yes > nul
nextpvr.exe is not in the same directory as NextPVRServer.exe. It's in a 'client' subdirectory.
Ok. That's right.

But I think there is still a missing % in line 8 in front of installpath
VCR58
Offline

Posting Freak

Marion Iowa, USA
Posts: 1,843
Threads: 177
Joined: Aug 2016
#4
2019-10-18, 06:08 AM (This post was last modified: 2019-10-18, 06:09 AM by VCR58.)
I'm still getting the error message.

"adding firewall rules...
starting service...
The service name is invalid.

More help is available by typing NET HELPMSG 2185."

This part is not working I think

  set _ServiceName="NextPVR Service"
  sc query %_ServiceName% | find "does not exist" > nul
  if %ERRORLEVEL% EQU 1 (
    echo installing service... 
    sc create "NextPVR Service" binpath="%installpath%NextPVRService.exe" start=delayed-auto
  )

even though the service does not exist it still does not create the service.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,835
Threads: 954
Joined: May 2006
#5
2019-10-18, 01:17 PM
Yes the line

if %ERRORLEVEL% EQU 1 (

should be

if %ERRORLEVEL% EQU 0 (

Martin
VCR58
Offline

Posting Freak

Marion Iowa, USA
Posts: 1,843
Threads: 177
Joined: Aug 2016
#6
2019-10-18, 01:52 PM
(2019-10-18, 01:17 PM)mvallevand Wrote: Yes the line

if %ERRORLEVEL% EQU 1 (

should be

if %ERRORLEVEL% EQU 0 (

Martin
That works. So, this statement

sc query %_ServiceName% | find "does not exist" > nul

if it finds "does not exist" in the response then %ERRORLEVEL% is supposed to return a "0"?
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,835
Threads: 954
Joined: May 2006
#7
2019-10-18, 01:58 PM
Yes 0 in the error level means that there was no error, it was able to find the string "does not exist"

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,661
Threads: 767
Joined: Nov 2003
#8
2019-10-18, 04:00 PM
argh...right you are. Windows NPVR.zip has been updated to fix this installservice.bat.
VCR58
Offline

Posting Freak

Marion Iowa, USA
Posts: 1,843
Threads: 177
Joined: Aug 2016
#9
2019-10-22, 12:16 AM
Sorry to keep bringing this up, but after running installservice.bat I noticed a firewall rule in my list of inbound rules named "NextPVR" with program location "installpathClient\NextPVR.exe" which is not going to do much.

This line in the bat file is missing a % in front of the variable
netsh.exe advfirewall firewall add rule name="NextPVR" dir=in action=allow program="installpath%Client\NextPVR.exe" enable=yes > nul

"installpath%Client\NextPVR.exe" should be changed to "%installpath%Client\NextPVR.exe"
SilverTiger
Offline

Member

U.S.A
Posts: 201
Threads: 44
Joined: May 2013
#10
2019-10-22, 06:08 PM
Wow, I didn't even know there was an "InstallService.bat" file. Sub's original note just says to run NextpvrServer.exe, which is what I've been doing. I'm assuming the service will perform whatever NextpvrServer.exe does? Should I be using that instead?
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Windows 24H2 - Can't install Hauppage Drivers Lao Pan 6 1,211 2025-04-04, 04:49 AM
Last Post: seattlefog
  Install Fail on Existing System jsauser11 8 478 2025-03-22, 05:35 AM
Last Post: sub
  [FIXED!] NPVRSetup.exe fails to install the latest version Pete (NZ) 5 954 2024-12-27, 03:08 PM
Last Post: mvallevand
  I can't start service daydreaming5 17 874 2024-12-08, 03:24 AM
Last Post: daydreaming5
  can't get http://localhost:8866/service=?method=channel.m3u JCDinPGH 15 1,021 2024-11-28, 03:20 AM
Last Post: JCDinPGH
  [Failed: Channel not found. Deleted?] and Service Restart jobby99 5 428 2024-11-25, 08:01 PM
Last Post: mvallevand
  How to Import Recordings from Prior Install Without any Export Recordings FIle jw1 32 1,952 2024-11-18, 11:41 AM
Last Post: jw1
  NextPVR latest version service crash three6zerocool 9 829 2024-11-13, 12:18 PM
Last Post: mvallevand
  unhandled exception causing service to crash jobby99 4 340 2024-11-08, 10:24 PM
Last Post: mvallevand
  Service stopping due to devicehost errors jobby99 3 422 2024-10-07, 11:36 PM
Last Post: mvallevand

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode