Repository Applications Update Information

Discussion in 'Misc Discussion' started by Glenn, May 17, 2015.

  1. Glenn

    Glenn Administrator Staff Member

    Keep in mind if an App uses %ProgramFiles% of any kind then it's not really a ppApp and should instead be converted back to a ssApp, even if it's not using a Setup it will be lost with a OS re-install, so it's not a ppApp, so SetupS is just "encouraging" you to do it the right way :p
     
    Trouba likes this.
  2. Trouba

    Trouba Administrator Staff Member

    So you're saying, use a ssApp.7z instead? :D Some original installers are like a box of maladies, but I do admit that if I can help it I don't create .exe installers from scratch if I can help it. Most of the time, it works to just add the runtime or other files in the app dir as you know, but for those pesky x64/x86 files with the same names, where the main exe is programmed to look in certain directories for them...
     
  3. The Freezer

    The Freezer Just this guy, you know Staff Member

    Well, strictly speaking, even if "ProgramFiles% was completely empty (for example, from a fresh install), then Trouba's ppApp "patch" would still populate it with the necessary files -- as that patch-file is/should be already contained in the ppApp's Install-to path (%AppPath%) -- after all, this was how ppApps were designed ...

    What he said.

    ;)
     
  4. Trouba

    Trouba Administrator Staff Member

    Freezer, that %SystemRoot% with the subfolders in the patch archive worked great.

    Glenn: could you post an example of that script that only blocks a given .exe in the app directory, say, Photoshop.exe? Just making sure I understand it.
     
  5. The Freezer

    The Freezer Just this guy, you know Staff Member

    LOL, you might want to change that to %SystemDrive% because if I ever get around to fixing the bug with %SystemRoot% ... well, your patch would then extract to "C:\Windows" instead ;)
     
    Trouba likes this.
  6. Trouba

    Trouba Administrator Staff Member

    Haha, sorry, I did indeed use %SystemDrive%!
     
  7. Glenn

    Glenn Administrator Staff Member

    To do an Unknown EXE:
    Code:
    @echo off
    setlocal enableextensions
    cd /d "%~dp0"
    
    for %%a in (*.exe) do (
    
    netsh advfirewall firewall add rule name="Blocked with Batchfile %%a" dir=out program="%%a" action=block
    exit
    )
    To do a Known EXE

    Code:
    @echo off
    setlocal enableextensions
    cd /d "%~dp0"
    
    netsh advfirewall firewall add rule name="Blocked with Batchfile %~dp0Photoshop.exe" dir=out program="%~dp0Photoshop.exe" action=block
    
    )
    Keep in mind %~dpo has a trailing backslash, so DON'T add one in to your path (%~dp0\Photoshop.exe) <- This will fail to block it.
    I've not tested but you might be able to get rid of the 2 %~dp0 if netsh uses the current path to add them, if it works with it, leave it, but if it fails to block, then try without them.

    -EDIT-

    I am thinking it would be best to block the exe name without the path, in case the same EXE tried to run from a modified drive/path, so try:

    Code:
    @echo off
    setlocal enableextensions
    cd /d "%~dp0"
    
    netsh advfirewall firewall add rule name="Blocked with Batchfile Photoshop.exe" dir=out program="Photoshop.exe" action=block
    )
     
    Trouba likes this.
  8. Trouba

    Trouba Administrator Staff Member

    Thanks a bunch, will test.
     
  9. Glenn

    Glenn Administrator Staff Member

    Trouba likes this.
  10. Trouba

    Trouba Administrator Staff Member

    I just tried your second example, the Known exe. It works!

    EDIT:

    Upping an app (Helicon) to repo right now which includes it.
     
    Glenn likes this.
  11. Trouba

    Trouba Administrator Staff Member

    How would you add multiple known exe's in one script? For example, SoftMaker Office textmaker.exe, planmaker.exe, presentation.exe?

    EDIT:

    Ah, figured it out:
    Code:
    @echo off
    setlocal enableextensions
    cd /d "%~dp0"
    
    netsh advfirewall firewall add rule name="Blocked with Batchfile %~dp0PlanMaker.exe" dir=out program="%~dp0PlanMaker.exe" action=block
    
    netsh advfirewall firewall add rule name="Blocked with Batchfile %~dp0Presentations.exe" dir=out program="%~dp0Presentations.exe" action=block
    
    netsh advfirewall firewall add rule name="Blocked with Batchfile %~dp0TextMaker.exe" dir=out program="%~dp0TextMaker.exe" action=block
    
    )
     
    Glenn likes this.
  12. Trouba

    Trouba Administrator Staff Member

    Shotcut ppApp is now dual-arch. Unpacked dirs for the x64 and x86 versions are over 500mb each, but when combined as dual-arch archive identical files in each get compressed efficiently, making the final ppApp.7z archive only a little larger than the x64 version alone.
     
    The Freezer and bphlpt like this.
  13. Johnrw

    Johnrw Active Member

    I tried to open that, on my XP laptop currently, and 7 zip knew more about it than winrar 3.99, but 7 zip got confused on some files. I then installed the latest 7 zip, but now it wants me to reboot my computer... which I just can't do at the moment. Ok, I asked. Might as well try and do a reboot.

    Edit an hour later:
    Ok, I rebooted the laptop, and the latest 7 zip... just says "Unspecified Error", and then doesn't do anything. So now I will move this to a 64 bit machine.
    (This day has turned into a wild goose chase.)

    Ok, 64 bit worked like a charm.
    So here goes nothing.
    Thank You!!!

    Edit: Next day
    I tried to use uSerenity-v2.2.1, by copying the .dat file with Default Settings... which was the only thing I could see that might be a "Patch" of it, into the same folder I ran it from, but I did not get the Use DHT option on the menus. I could not see a way to use a magnet link in the program... so I eventually gave up and installed the free bittorrent app. That program knew how to use a magnet link.

    I guess I have more work to do here. But after my first day here... what a great place this is!!!

    Edit 2:
    A day later... it turns out my 7 zip upgrade broke 7 zip. I uninstalled it and reinstalled it and now it is working. I've decided to leave bittorrent running to share this stuff. I've got LastXP v14 downloaded and am now seeding it.
     
    Last edited: Sep 19, 2019
  14. The Freezer

    The Freezer Just this guy, you know Staff Member

    You needn't have gone to all that trouble with 7-Zip. Just install it as a ppApp with SetupS -- it'll take care of all the details for you. ;)
     
    Trouba likes this.
  15. Trouba

    Trouba Administrator Staff Member

    That reminded me, I hadn't updated the ppApp versions of 7-Zip and WinRAR in ages. I thought no one was using those and even I who liked the ppApp versions just installed the ssApps instead. But I updated the ppApps and am switching back to using those, instead.
     
    bphlpt likes this.
  16. Trouba

    Trouba Administrator Staff Member

    Oops, the WinRAR ppApp lacked license, fixing it now.

    EDIT: fixed
     
  17. The Freezer

    The Freezer Just this guy, you know Staff Member

    FYI, I had noticed that the ppApp for "Bulk Rename Utility" wasn't registering the dll for it. It was missing the info for that, so I added it back in "v3.2.01" (and v3.1.0.0, I think) and re-upped the corrected apz.
     
    bphlpt and Trouba like this.
  18. Trouba

    Trouba Administrator Staff Member

    Ah yes, context menu for it. I don't use it much so I didn't even know it had this.
     
  19. The Freezer

    The Freezer Just this guy, you know Staff Member

    Oh yes, BRU is a must have utility for me. :)
     
  20. Trouba

    Trouba Administrator Staff Member

    :)

    Spencer ppApp just uploaded. It's a simple, portable XP style start menu for Windows 8, 10 (also works on 7). I made it into a ppApp that taskbar-pins it. Might come in handy.
     
    The Freezer likes this.
  21. Trouba

    Trouba Administrator Staff Member

    MediaHuman YouTube to MP3 Converter is apparently freeware now. Foxit still doesn't appear to be releasing "clean" installers for Foxit Reader anymore, and instead only offer "prom" (promotional content) installers, meaning it will try to install Foxit PhantomPDF. I haven't looked into whether this can be circumvented with switches, or if they do still offer the "clean" versions as well. Their download links now can't be guessed anymore as they put unique identifiers in the addresses of each .exe. So even if you happen to get links for a clean version one time, the next update to the app the links are different again. They want to deny access to non-promotional installers and probably keep those available only for corporate needs (if they even make them anymore at all). So I tried to keep the Foxit Reader ppApp as full-featured as possible, with it only lacking ConnectedPDF and Creator, as these either require running processes or installation of drivers.
     
    Glenn, The Freezer and bphlpt like this.
  22. The Freezer

    The Freezer Just this guy, you know Staff Member

    I've upped a slightly modified qBittorrent ppApp that will update the client and preserve its current settings and data. (Or if never installed before, will initialize it for the first time)

    I'm unsure what torrent client Trouba uses; so he may not be aware of the problem -- which has been an ongoing issue with qBittorrent for a while now. It doesn't matter how you update it ... whether via the internal updater, downloaded from their website, ssApp, even the ppApp would reset the client -- everything: the settings and your torrent data!

    The only fix the qB developers recommended was to manually back up the settings, do the update, then manually restore the settings. That is if you could figure out where the settings is located (both AppData\Local and AppData\Roaming) or use something like Hekasoft Backup & Restore. :what:

    And it's unfortunate since it turns out to be such an easy fix. I wanted to see how PortableApps.com did the updates and preserved the settings and data. I'd contemplated using theirs except they don't have an x64 version for dual-arch installing, etc. like Trouba's ppApp. So instead I incorporated their way into Trouba's ppApp -- all that was done was removed the qBittorrent.ini from the app folder. ;)
     
    Trouba likes this.
  23. Trouba

    Trouba Administrator Staff Member

    Yep, this is an issue as including some config files will help to pretweak some apps, not check for updates, etc. -- until it's actually desired that the app does that :D The emphasis had always been on clean OS installs and new app installs but for some apps it's just too complicated and we don't want to overwrite personal usage settings in case of a regen or what have you. Personally I use qBittorrent but I use it very infrequently so I am not even aware of issues like this.
     
  24. The Freezer

    The Freezer Just this guy, you know Staff Member

    No, it's not your ppApp's fault. It was how the qB developers designed their updates with literally no way to preserve your settings.

    For example, I can download and install the updates for Filezilla -- either internally from within Filezilla or via their website -- and it preserves my settings after the update.
     
    Trouba likes this.
  25. Glenn

    Glenn Administrator Staff Member

    I expect if Freezer uses a script (that is ordered to run before installing) to rename the current qBittorrent.ini to qBittorrent.bak and after it's installed/updated that it delete the new qBittorrent.ini and rename the qBittorrent.bak to .ini. Something similar to that? - I might go download and see for myself :)

    Code:
    rem Mkdir "%AppData%\qBittorrent\"
    rem #Is_x64# Copy "%AppPath%\_x64\qBittorrent.ini" "%AppData%\qBittorrent" /y
    rem #Is_x86# Copy "%AppPath%\_x86\qBittorrent.ini" "%AppData%\qBittorrent" /y
    del /F /Q "_x64\qBittorrent.ini" >nul:
    del /F /Q "_x86\qBittorrent.ini" >nul:
    well you have remed out the feature and delete the portable backup, so I don't know how the settings would persist after a fresh OS install. It's no longer portable and uses the %AppData% version, I see no benefit for changing this, would prefer my method I thought you would use :p
     
    Last edited: Nov 16, 2019
    bphlpt likes this.

Share This Page