views:

80

answers:

1

I'm going to write a script to disable/enable network access for applications in windows. My idea was to write a script that runs a windows shell command that do this.

The scripting is the easy path, but i don't know how to do the "denying" part. Any ideas?

+1  A: 

This sounds like a task better suited to letting Windows user / group security handle.

For example, assuming you're on Active Directory and have administration privileges, you could create a user account with the very specific access your app needs, and configure your app to authenticate with the network using that user's credentials.

Then your app through AD would access the network within the constraints of that user account's privileges, and if necessary deny them access to specific network resources.

Darth Continent