depler / transmission-vs

Portable transmission daemon for windows. Built with Visual Studio and static linkage. Zero binary dependencies.
18 stars 3 forks source link

Remove TRANSMISSION_WEB_HOME from environment variables when deleting service #4

Closed Pentaphon closed 1 year ago

Pentaphon commented 1 year ago

Hi, I got this weird error after using transmission-vs and removing it so I can use the new Transmission 4.0.0 beta 3

1) I removed the transmission-vs service per the instructions on the README and deleted the transmission-vs folder. 2) Removed any app data that might have been left behind to be sure I got a clean install of 4.0.0 beta 3 3) Installed Transmission 4.0.0 beta 3 to try the new web-UI and help test 4) When I pressed Remote > Open web client on 4.0.0 beta 3, I get the following on my Firefox:

404: Not Found
C:\Transmission\web/index.html (The system cannot find the path specified.)

This is NOT where Transmission 4.0.0 beta 3 is installed, but rather, where I put my Transmission-vs folder, which also made a C:\Torrents folder.

Why is 4.0.0 beta 3 pointing to where I had the transmission-vs web-UI?

Is this a remnant somewhere stuck in the registry after installing transmission-vs as a service?

I am not able to connect to the web-UI on 4.0.0 beta 3 because of this.

Since it's pointing to where I had my transmission-vs folder, is this due to something transmission-vs left behind? Please advise.

depler commented 1 year ago

Hi, you need to change/remove TRANSMISSION_WEB_HOME environment variable

Pentaphon commented 1 year ago

Got it, thanks! I don't remember ever changing that myself though. Does that just happen automatically when using Transmission-vs? Do we need to remove that variable every time we stop using transmission-vs?

depler commented 1 year ago

Yes, it is set automatically when you run service_create.bat. I will fix it in future, it should be deleted with service.

Pentaphon commented 1 year ago

Yes, it is set automatically when you run service_create.bat. I will fix it in future, it should be deleted with service.

Glad to hear that is unintended behavior. About time I find an issue that actually needs a fix. Thanks for the quick response.

Pentaphon commented 1 year ago

@depler could you make this happen for 4.0.0?

depler commented 1 year ago

Sorry, there is no easy way to delete environment variable in Windows (thank you, Microsoft). Need some research in future.

Pentaphon commented 1 year ago

Sorry, there is no easy way to delete environment variable in Windows (thank you, Microsoft). Need some research in future.

Maybe not create it so it doesn't conflict with the original client?

depler commented 1 year ago

Without creating it - transmission doesn't know where to search web UI files, so it will not work as portable executable

Pentaphon commented 1 year ago

Without creating it - transmission doesn't know where to search web UI files, so it will not work as portable executable

I currently use this to run a portable daemon on Windows. It's similar to your project, but it never gave me this issue. I think it is because it just runs the exe in the background instead of installing a service. Perhaps it will give you more information to solve this issue. I'd love to switch to yours since it is using 4.0.0 instead of the old 2.77 code.

https://sourceforge.net/projects/transmissiondaemon/

depler commented 1 year ago

I've fixed this. No more TRANSMISSION_WEB_HOME variable in scripts, using public_html subfolder instead.

Pentaphon commented 1 year ago

Thanks! Really appreciate it.