VinceVal / SickRageInstaller

A Windows Installer for SickRage
23 stars 14 forks source link

Unable to find network drive after upgrading with Windows installer #6

Open greg4168 opened 8 years ago

greg4168 commented 8 years ago

Hi - I updated my existing SickRage installation using the Windows installer and it cannot reference the network drive containing my content anymore. I have it mapped in Windows 10 as Z:\, but it isn't recognized by SickRage. I have tried configuring the service to use the local system account, network service, and the network account used by the drive, to no avail. Any tips?

Thanks

alisonatwork commented 8 years ago

I wasted a couple hours on this and then gave up. I don't think user-mapped drives can be seen outside of that login instance, even if you set up the service to run as the exact same user.

Then I tried using symbolic links like someone suggested (mklink /d z \nas\z) but I found that an ugly solution too because Python does not handle Windows symbolic links elegantly when doing stuff like making new directories.

Now I have removed the service altogether and just start it up manually on login. I wonder if perhaps that could be an option in the installer, or if we should install an additional script for people who prefer not to have a service.

VinceVal commented 8 years ago

@greg4168 and @alisonatwork:

Can you please try something for me?

Create a batch file named StartService.bat in C:\SickRage\Installer with:

NET USE T: \\NAS\TV /USER:username password

C:\SickRage\Python\python.exe "C:\SickRage\SickRage\SickBeard.py" --nolaunch --port=8081 --datadir="C:\SickRage\Data"

Then, use the "Edit SickRage Service" shortcut and make it look like this:

image

If you do it this way, it looks like the mapped drives show up for all users of the machine as "Disconnected:"

image

Comments, ideas, feedback? I'd like to implement a more elegant solution in SickRageInstaller if people like this concept.

alisonatwork commented 8 years ago

Okay sorry for the delay, I only just got round to trying this. This did not work for me on Windows 10 build 10586. SickRage started, but no drive got mapped (not visible either in Explorer/Command Prompt, or in SickRage itself). I checked the Event Log but there was nothing in there besides saying that the service had started okay.

VinceVal commented 8 years ago

@alisonatwork well crap. I'll try it on a Windows 10 box when I get a chance.

labrys commented 8 years ago

I tried this briefly on Win 10 x64 and no joy. Didn't look into it much beyond that yet.

alisonatwork commented 8 years ago

I am beginning to think the mklink solution might be the only one that works. This wouldn't be a terrible solution, if the user could enter his NAS root dir during the installer and we mount that underneath C:\SickRage. The problem I had accessing that was that it wouldn't let you navigate deeper than the initial folder, but this might have been a side-effect of the bug I fixed where the HTTP requests to navigate the filesystem were getting cached by the web browser so you wouldn't see any changes in the directory structure. I can retry the mklink thing again over the weekend if you like.

rd1 commented 8 years ago

same problem on windows 7. using the installer i can't see shares. but installing the longway works fine. Seems a step was missed or overlooked when making the script for the installer.

Here's the solution : remove the service made by the installer and recreate it manually with nssm following these steps: http://www.htpcguides.com/create-sickrage-windows-system-service-v2/

let's hope these steps can be added to the installer.

miigotu commented 8 years ago

The solution for this for some people was to edit the service and set the user credential to the actual user they log in with, who owns the shares.

Curious, does nssm use the network system user?

VinceVal commented 8 years ago

@miigotu by default, services run as LOCALSYSTEM, but can be configured to run as any user. I could make it so the installer configures the service as the logged in user, or offers them a choice, or maybe even makes a dedicated service account...

Also, since the file browser in SR now allows the user to type a path, UNC paths should be much easier to deal with and mapping drive letters shouldn't be as much of an issue.

rd1 commented 8 years ago

the real solution is to not run it as a service but load it in the vbs that's given on the install page.

miigotu commented 8 years ago

@rd1 that isnt a solution, its like starting a fire with sticks instead of your lighter just because your thumb hurts.

rd1 commented 8 years ago

its a valid solution if you can't get the service to work, as this installer clearly can't make the service run.

miigotu commented 8 years ago

"My heater doesn't work in my car, so I'm going to walk to work all winter"

Hey if walking works right?

rd1 commented 8 years ago

right, well if you want the service to run right, why don't you make a proper installer that you can fix when its broken. instead of relying on someone from the community to make it ?

miigotu commented 8 years ago

Except @VinceVal offered to make it? And this is a proper installer? It has a small easily corrected issue. And open source IS RUN by the COMMUNITY? If you dont like someone's contributions, dont use them and keep your opinion to yourself.

smokinpuppy commented 8 years ago

I realize that these posts are from a while ago, but @VinceVal your solution worked for me on Windows 10 :+1: Thank you.

shastada commented 7 years ago

I've modified the process to use my user account and I still can't see the share drive. Is there a fix or work around for this yet?

I tried this suggestion from another site for privileged user access to shares. And it does allow for example a admin command prompt to see my Z drive but still doesn't fix SickRage.

To configure the EnableLinkedConnections registry value Click Start, type regedit in the Start programs and files box, and then press ENTER. Locate and then right-click the registry subkey HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System. Point to New, and then click DWORD Value. Type EnableLinkedConnections, and then press ENTER. Right-click EnableLinkedConnections, and then click Modify. In the Value data box, type 1, and then click OK. Exit Registry Editor, and then restart the computer.

miigotu commented 7 years ago

You use the full UNC path \\server\sharename, not the local mount point. Just type it in the box at the top of the browse dialog and click ok

MeasuredLyric commented 7 years ago

I know this is an old thread, but I'm new to SickRage, and this thread seems to cover both issues I had installing on Windows 7 and accessing my previously downloaded SickBeard content.

@miigotu As I mentioned here, simply typing the UNC path in the browse dialog and clicking ok is not enough to get the path into the Manage Directories tab. I found it necessary to press [Enter] after the UNC path before clicking ok. When pressing [Enter] the progress indicator to the left of the ok button spun for about 0.25s after which the ok button worked as expected.

@VinceVal I found that neither LocalService nor NetworkService could access folders on a UNC path through the SickRage service (after fighting the interface to get the UNC path to show up, see above). Even if I opened up all permissions to everyone on the \\servername\Multimedia\TV Shows folder on the NAS and in windows 7, SickRage could not access, list, or create folders. The only way I could get it to work was by running the service with my (admin user) credentials. If you are still working on the installer, I'd suggest installing the service to use the credentials of the user doing the install by default, and maybe allowing that user to choose another credential if they so desire.

The install process on windows could definitely be smoother, but now that I'm able to access my folders, I must say that the SickRage interface looks great. Getting it hooked up to sabnzbd and doing post processing is tomorrow's project.