infinitenothing Posted July 24, 2017 Report Share Posted July 24, 2017 I keep coming to computers and I guess the user didn't approve the exception or something because they're getting an error 56 when the app opens a TCP connection. I'm looking for ways to avoid this. Some ideas: Autoapprove the exception as part of installation Is there a way to keep prompting them until they approve the exception or close the app Maybe a command line I can send them if they say they are seeing error 56? Quote Link to comment
LogMAN Posted July 24, 2017 Report Share Posted July 24, 2017 56 minutes ago, infinitenothing said: I keep coming to computers and I guess the user didn't approve the exception... How dare them making a choice when they are asked to? 43 minutes ago, infinitenothing said: Autoapprove the exception as part of installation You cannot approve the dialog automatically as it is shown only after starting the application (or restarting the computer) during which you don't have elevated access. However you could add firewall rules as part of the installation procedure (see below). 43 minutes ago, infinitenothing said: Is there a way to keep prompting them until they approve the exception or close the app None that I know of. It is also very annoying to get prompted over and over again after making a choice. Why even bother asking if there is no choice in the first place? Software that does that is malware in my opinion. Also I can see users taking three courses of action: Allow access (stupid, since it could be malware, also teaches your users bad habits) Decline and inform IT (IT will knock on your door, so go for it if you need to talk to them urgently ) Uninstall (yeah, might not be IT who is knocking next) 43 minutes ago, infinitenothing said: Maybe a command line I can send them if they say they are seeing error 56? You can actually run command line instructions during installation in order to add firewall rules. Have a look at the instructions over at TechNet: https://technet.microsoft.com/en-us/library/dd734783(v=ws.10).aspx Once you figured out the necessary firewall rules (e.g.: by checking a computer that accepted the rule), you can build the commands and execute them during installation. It should be possible to run the instructions using the post-install action (run application after installation), though I'm not sure if it will actually be run in elevated mode. Another option is to use a custom installer (we made our own using Inno Setup) and pack the LabVIEW installer inside the custom installer. 1 Quote Link to comment
Rolf Kalbermatter Posted July 25, 2017 Report Share Posted July 25, 2017 (edited) 11 hours ago, LogMAN said: Once you figured out the necessary firewall rules (e.g.: by checking a computer that accepted the rule), you can build the commands and execute them during installation. It should be possible to run the instructions using the post-install action (run application after installation), though I'm not sure if it will actually be run in elevated mode. The post install action is run in the context of the installer so it should have the same elevated rights. That SHOULD be enough, but I'm sure there is a possible scenario with custom policies and such from a heavily guarded IT departement that could allow users to install applications but not change firewall rules. Most likely not intentionally but still! Edited July 25, 2017 by rolfk Quote Link to comment
infinitenothing Posted August 8, 2017 Author Report Share Posted August 8, 2017 For follow up, I was able to create a batch file: netsh advfirewall firewall add rule name=%1 dir=in program=%2 action=allow and in my installer I have these command line arguments "Allow MyApp" "[INSTALLDIR]MyApp.exe" Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.