-
-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvement on firewall batch scripts #1030
base: main
Are you sure you want to change the base?
Conversation
For you, my king- |
Just did a quick test and indeed seems to fix the issue. Although the %CD% value does have to be correct (Right click as admin will run it from System32 and thus not specify the correct java binary). But this would have to be setup correctly in the installer I'd assume. |
Sadly just a skill issue on Window's part. |
@electromuis Try again! I think I fixed the issue with right clicking and using Run As Administrator... Also first, use uninstall_firewall a few times as I also added duplicate detection to the install script... So you might currently have duplicate rules. |
Just short, I think you need to allow javaw.exe and not java.exe do you have a way to confirm? |
...Look above, @electromuis had his issue fixed with java.exe being allowed (also some internet searches agree with this) |
You could do both, I believe we're only using java.exe though |
do we need to have the UAC prompt script? |
As discussed on the top post, firewall modification fails without admin perms. And besides, if the script is already given admin, the prompt is skipped |
iirc it's the best way to do it, batch scripts stink. I have worries about it having different behaviour in different versions of Windows but it's probably alright? |
It's been basically a tried and true method for most versions of windows... Atleast any that support UAC :P |
Well if it works then sweet at least Windows can do something good lmao, we already had a blunder with the installer crashing because we had the audacity to format JSON on Windows 7. This PR looks good to be, but not reviewing because I can't really thoroughly check it rn. May do so later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well i tested some Stuff on Windows 11 Version 22631.3593
I did not test the script itself. To this date.
For me Windows 11 only adds rules on Incomming to the firewall when i deny or allow the Program via popup. So not sure if this is different in the Version @electromuis uses.
So uh, idk if I should do those changes or keep the rules for 'better safe than sorry' |
Co-authored-by: unlogisch04 <98281608+unlogisch04@users.noreply.github.com>
"%temp%\getadmin.vbs" | ||
exit /B | ||
) | ||
|
||
echo Installing firewall rules... | ||
|
||
rem Discovery default port |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rem Discovery default port |
Let's go in a list here...
enable=yes
Discovery defauly port
toDiscovery default port
Before:
After:
(UAC prompt quickly appears. It's so fast I had to use
timeout 5
to have a delay so I could screenshot)(User presses No, the script closes.)
(User presses Yes, script continues as below)