locked
Adding Windows Firewall Exceptions for a particular app RRS feed

  • Question

  • We are sequencing an application that requires a Windows Firewall exception to be created for the EXE that runs in the virtual environment.  I'm trying to create the exception with OSD scripting using netsh run from a vbscript.  I have the OSD script set to run at Pre-Launch.  If I set PROTECT="FALSE", the app can't find the exe to set the rule so it fails since it can't penetrate the virtual environment to see the exe.  If I set PROTECT="TRUE" it creates the appropriate reg keys inside the virtual registry and the Windows Firewall can't read the virtual registry so it doesn't allow the exception.  I can probably just add the reg keys manually with the OSD script since it won't check to see if the file is there before adding the rule, but I'd much rather use netsh if possible.  Is there a way to make this work?  How is everyone else adding Windows Firewall exceptions for their app-v apps?

    One other question with OSD scripting--I'm running the script that executes the netsh command via a vbscript as mentioned above.  Is it possible to store the vbscript within the virtual environment and execute it from there to add either the appropriate reg keys or run the netsh command?  I haven't been able to find any documentation that shows running the script from inside the bubble so I don't know if that would work or not.  I've only seen OSD scripting examples that show a cmd file or some other type of script being run from a network share.  I'd much prefer to be able to run the script from the virtual environment so it is self contained.  I need to use the vbscript because I need logic to determine if it is running on XP or Windows 7 as the netsh commands will be different (on Windows 7 it is netsh advfirewall for the Advanced Firewall).

    Thanks in advance for the assistance.
    Wednesday, March 17, 2010 3:55 PM
    Moderator

Answers

  • Hello,

    I would control the Windows Firewall using Group Policies.

    /Znack
    Wednesday, March 17, 2010 4:46 PM

All replies

  • Hello,

    I would control the Windows Firewall using Group Policies.

    /Znack
    Wednesday, March 17, 2010 4:46 PM
  • Thanks for the reply.  We'll probably have to do it that way.  I was thinking about it after I wrote the post and realized that users on these machines won't have admin rights, so they wouldn't be able to have the script run successfully anyway to set the keys in HKLM.

    Thanks for the reply.
    Wednesday, March 17, 2010 5:22 PM
    Moderator
  • Thanks for the reply.  We'll probably have to do it that way.  I was thinking about it after I wrote the post and realized that users on these machines won't have admin rights, so they wouldn't be able to have the script run successfully anyway to set the keys in HKLM.

    Thanks for the reply.

    I am quite new to Windows administration. Is it possible to modify the Group Policies with a VBScript? I would like to add some firewall exceptions and other windows customisation (set a unique wallpaper for all users, disable screensaver...). I'm looking a way to do that on several computers of my domain. I suppose the easiest is to script it.
    Thursday, September 5, 2013 7:28 AM