simplewall icon indicating copy to clipboard operation
simplewall copied to clipboard

[Feature] Trigger Refresh from Command Line

Open GenericMale opened this issue 1 year ago • 1 comments

Checklist

  • [X] I have used the search function to see if someone else has already submitted the same feature request.
  • [X] I will describe the problem with as much detail as possible.
  • [X] This issue only contains a request for one single feature, not multiple (related) features.

App version

3.8.4

Problem you are trying to solve

I'm using scoop to install packages, which creates a new folder for every new version of an application and additionally a symlink called current is created which always points to the latest installed version. When an App is configured in Simplewall by using this current directory, the resolved path (i.e. the directory with the version) is configured in WFP. So after updating applications, the associated rules do not take effect immediately. However, when clicking the refresh button within simplewall, the rules are automatically updated in WFP and will point to the latest version and everything works flawlessly again!

So my rather simple request is to add a flag to the simplewall.exe which will trigger a rule refresh in the exact same way as when the refresh button is clicked in the UI. This way it can be easily automated everytime a scoop update is performed or something else requires a rule refresh.

Suggested solution

Add CLI Argument to simplewall.exe to trigger a rule refresh (same as the Refresh Button in the GUI).

e.g.: simplewall.exe -refresh

When this flag is provided, the UI should not launch and just a rule refresh should be triggered. It should also work when another instance of simplewall is already running.

Screenshots / Drawings / Technical details

No response

GenericMale avatar Oct 09 '24 14:10 GenericMale

Happy to see that someone is experiencing the same thing and also made a comprehensive feature request. Hopefully @henrypp is willing to oblige 🙂

However, while I would appreciate the -refresh parameter, it shouldn't be necessary for the Scoop situation: it seems to be simplewall that changes the resolved path before it is configured in the WFP.

If I just test by adding a firewall rule via the Windows Defender Firewall, the full path remains as added (including the symlink), instead of being resolved (checked via the registry).

So this can be properly fixed within simplewall.

ltguillaume avatar Jan 22 '25 21:01 ltguillaume