aclap-dev / vdhcoapp

Companion application for Video DownloadHelper browser add-on
GNU General Public License v2.0
1.8k stars 290 forks source link

[BUG] I can't select the location of where I want the Companion App to be installed. #103

Closed gaveitatry2 closed 1 year ago

gaveitatry2 commented 3 years ago

This is where I want my Companion App to be installed: "C:\Programs\Portable Apps\PortableApps\FirefoxPortable\net.downloadhelper.coapp"

But the installer doesn't give me a choice of where I want to install it. It just installs where it wants. Right now it is installing to: "G:\009__Other\Portable Apps\PortableApps\FirefoxPortable\net.downloadhelper.coapp"

Please let me install the Companion App where I want!!!!!!!!!!!!!

I tried copying Companion App from one place to another, and it did not work. That's why I want the installer to let me choose where to install.

gaveitatry2 commented 3 years ago

I tried unplugging my USB Drive (G:) and double clicking VdhCoAppSetup-1.6.3 to see if I could install in my desired location of "C:\Programs\Portable Apps\PortableApps\FirefoxPortable\net.downloadhelper.coapp". But it won't let me. I get this error message "The drive or UNC share you selected dows not exit or is not accessible. Please select another." and then it won't let me choose my desired location. It just closed the installer. How am I supposed to install this Companion App? If I install it at the G: drive, it will break my browser because then I want be able to pass html files onto the browser's exe. That's why I absolutely 100% need the Companion App installer to let me choose the installation location. I tried to go to RegEdit and look for Companion App registry files to delete. I found some, but that didn't work.

mi-g commented 3 years ago

Just deleted a comment from Kunal Naithani that included binary files to affect the registry. Since the files cannot be verified, it is way too dangerous to keep them in this thread. Kunal, you may want to share the text version of those files instead.

kunal28889 commented 3 years ago

So I was facing a similar problem, where I had to use the companion app without installing it. What surprisingly worked for me was that I just had to :

Registry keys :

1=>
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE\DownloadHelper]

[HKEY_CURRENT_USER\SOFTWARE\DownloadHelper\net.downloadhelper.coapp]
"InstallFolder"="C:\\Code\\Programs\\net.downloadhelper.coapp"
"Version"="1.2.4"

2=>
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\weh-iss-net.downloadhelper.coapp_is1]
"Inno Setup: Setup Version"="5.5.5 (u)"
"Inno Setup: App Path"="C:\\Code\\Programs\\net.downloadhelper.coapp"
"InstallLocation"="C:\\Code\\Programs\\net.downloadhelper.coapp"
"Inno Setup: Icon Group"="net.downloadhelper.coapp"
"Inno Setup: User"="kunaln"
"Inno Setup: Language"="english"
"DisplayName"="VdhCoApp 1.2.4"
"UninstallString"="\"C:\\Code\\Programs\\net.downloadhelper.coapp\\unins000.exe\""
"QuietUninstallString"="\"C:\\Code\\Programs\\net.downloadhelper.coapp\\unins000.exe\" /SILENT"
"Publisher"="DownloadHelper"
"URLInfoAbout"="https://github.com/mi-g/vdhcoapp"
"HelpLink"="https://github.com/mi-g/vdhcoapp"
"URLUpdateInfo"="https://github.com/mi-g/vdhcoapp"
"NoModify"=dword:00000001
"NoRepair"=dword:00000001
"InstallDate"="20190531"
"EstimatedSize"=dword:0001453a

3=>
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE\Mozilla\NativeMessagingHosts\net.downloadhelper.coapp]
@="C:\\Code\\Programs\\net.downloadhelper.coapp\\firefox.net.downloadhelper.coapp.json"

NOTE: If you dont have access to HKEY_LOCAL_MACHINE, just change it to HKEY_CURRENT_USER

This is for Win10 btw.

gaveitatry2 commented 3 years ago

@kunal28889 cc @mi-g

Thanks. This helped some. It isn't the perfect fix for various reasons, which I will get into later. But it is a huge improvement. Your explanation and instructions were lacking, but I just took a wild guess at what I was supposed to do and then made it work eventually through trial and error.

1.) One thing that I noticed is that in your listed code, you had "C:\\Code\\Programs\\net.downloadhelper.coapp". I guessed that I needed to replace it with my desired folder location. It was strange seeing double backward slashes instead of single slashes. I never saw that before. But I just went with it. I replaced all instances of"C:\\Code\\Programs\\net.downloadhelper.coapp" with "C:\\Programs\\Portable Apps\\PortableApps\\FirefoxPortable\\net.downloadhelper.coapp" and kept all the other code the same.

2.) I wasn't sure how to import the registry keys. At first, I tried opening up RegEdit but I noticed that [HKEY_CURRENT_USER\SOFTWARE\DownloadHelper] did not exist. The other registry code looked complicated and time consuming to add, so I guessed that manually adding each thing would take forever. So I did a quick search on Google and saw that I could turn a notepad document into a registry edit file by changing the file extension from .txt to .reg. But when I copied and pasted the registry code with the new "C:\\Programs\\Portable Apps\\PortableApps\\FirefoxPortable\\net.downloadhelper.coapp" changes, I received an error message. So once again, I had to make some guesses on what I had to do. I decided to delete the 1=>, 2=>, and 3=> lines and split up the registry code into three separate registry files. This is what I ended up with.

xxxxx

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE\DownloadHelper]

[HKEY_CURRENT_USER\SOFTWARE\DownloadHelper\net.downloadhelper.coapp]
"InstallFolder"="C:\\Programs\\Portable Apps\\PortableApps\\FirefoxPortable\\net.downloadhelper.coapp"
"Version"="1.2.4"

xxxxx

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\weh-iss-net.downloadhelper.coapp_is1]
"Inno Setup: Setup Version"="5.5.5 (u)"
"Inno Setup: App Path"="C:\\Programs\\Portable Apps\\PortableApps\\FirefoxPortable\\net.downloadhelper.coapp"
"InstallLocation"="C:\\Programs\\Portable Apps\\PortableApps\\FirefoxPortable\\net.downloadhelper.coapp"
"Inno Setup: Icon Group"="net.downloadhelper.coapp"
"Inno Setup: User"="kunaln"
"Inno Setup: Language"="english"
"DisplayName"="VdhCoApp 1.2.4"
"UninstallString"="\"C:\\Programs\\Portable Apps\\PortableApps\\FirefoxPortable\\net.downloadhelper.coapp\\unins000.exe\""
"QuietUninstallString"="\"C:\\Programs\\Portable Apps\\PortableApps\\FirefoxPortable\\net.downloadhelper.coapp\\unins000.exe\" /SILENT"
"Publisher"="DownloadHelper"
"URLInfoAbout"="https://github.com/mi-g/vdhcoapp"
"HelpLink"="https://github.com/mi-g/vdhcoapp"
"URLUpdateInfo"="https://github.com/mi-g/vdhcoapp"
"NoModify"=dword:00000001
"NoRepair"=dword:00000001
"InstallDate"="20190531"
"EstimatedSize"=dword:0001453a

xxxxx

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE\Mozilla\NativeMessagingHosts\net.downloadhelper.coapp]
@="C:\\Programs\\Portable Apps\\PortableApps\\FirefoxPortable\\net.downloadhelper.coapp\\firefox.net.downloadhelper.coapp.json"

xxxxx

3.) This seemed to do the trick. After I moved the Companion App installation folder from "G:\009Other\Portable Apps\PortableApps\FirefoxPortable\net.downloadhelper.coapp" to "C:\Programs\Portable Apps\PortableApps\FirefoxPortable\net.downloadhelper.coapp" and restarted Firefox, it showed that the Companion App was installed at the desired location. Also, when I navigated to "G:\009Other", I no longer saw a Portable Apps or a Companion App folder, which is good. I didn't want my Portable Apps or Companion App to be installed on my removable G:\ drive anymore.

4.) So this fix is really good and appreciated, minus some caveats. For instance, if I delete the Companion App folder and try to install it again, it will once again be installed at "G:\009__Other\Portable Apps\PortableApps\FirefoxPortable\net.downloadhelper.coapp" because the stupid installer doesn't ask where you want to install it and your registry keys doesn't change the desired location of the installation. But it is a huge improvement. So thank you.

gaveitatry2 commented 3 years ago

@kunal28889 cc @mi-g

UPDATE: I repeated the instructions in my above post, but I changed HKEY_CURRENT_USER to HKEY_LOCAL_MACHINE and that did the trick. So my advice to anyone following these instructions is to make six registry files. Three with HKEY_LOCAL_MACHINE and three with HKEY_CURRENT_USER.

I'm all good now. Thanks a lot @kunal28889. After so many years living with this problem, it's great that someone out there cared and had a solution. I got tired of mi-g always telling me "sorry" and "tough luck" instead of actually doing something about it.

gaveitatry2 commented 3 years ago

UPDATE: Just now I installed a Windows 10 update. When I opened up CCleaner and looked at Programs, I had two instances of VdhCoApp listed. One for 1.2.4 and one for 1.6.3. I tried uninstalling the 1.2.4 one, but for some reason it uninstalled the 1.6.3 instead. So I uninstalled both of them and reinstalled VdhCoApp (even though I had already done a fresh install yesterday). When I went to install VdhCoApp, it actually prompted me WHERE I want to install it. So that's good! Maybe in addition to the steps in my previous posts, you also have to find VdhCoApp in a free version of CCleaner and use the uninstaller. Oh, and before you uninstall VdhCoApp, it's a good idea to export your settings first, which I already did. Then after the install, import your settings.

paulrouget commented 1 year ago

This should be fixed with the new installer. This will be part of the next release. Please re-open if it's not fixed for you.