Jump to content

how to disable renaming of files


Marx
 Share

Recommended Posts

Hi,

we got a policy implemented in our network that only allows certain apps to run.

Users are getting around it by renaming the disallowed app to something that's on the allowed list (e.g. notepad.exe).

Is there a way to prevent users from renaming files in a certain directory?

Thank you,

Matthias

Link to comment
Share on other sites


I am under the assumption this is a work type thing, and the OP might not be able to simply lock the folder, employee's usually need some form of write access. Not to mention the number of employee's who have local admin rights and can simply unlock the folder if they wanted to.

So while we cannot stop them from renaming the .exe in all cases, they probably cannot change it's Window Title. You could add this script to logon via group policy and it will run silently all day, preventing any windows from opening with that App's title. No idea what app we are talking about, so here is a sample that kills VMware, adjust as necessary.

Prevent_VMware.vbs

Set WshShell = Wscript.CreateObject("WScript.Shell")
Do While Not Wshshell.AppActivate ("VMware Workstation")
Wscript.sleep 1000
Loop
Wshshell.AppActivate "VMware Workstation"
Wshshell.SendKeys "%{F4}"

EDIT: Actually, this would only prevent the first VMware window and then quit, you would need to be re-write something that would stay running longer. But you get the idea.

Edited by MrJinje
Link to comment
Share on other sites

There are many ways to stop this, but generally, if you have employees in your company that are not obeying corporate policy, no amount of IT fixes are going to help you. This is one of those situations where there is also a business answer.

Link to comment
Share on other sites

I am under the assumption this is a work type thing, and the OP might not be able to simply lock the folder, employee's usually need some form of write access. Not to mention the number of employee's who have local admin rights and can simply unlock the folder if they wanted to.

So while we cannot stop them from renaming the .exe in all cases, they probably cannot change it's Window Title. You could add this script to logon via group policy and it will run silently all day, preventing any windows from opening with that App's title. No idea what app we are talking about, so here is a sample that kills VMware, adjust as necessary.

Prevent_VMware.vbs

Set WshShell = Wscript.CreateObject("WScript.Shell")
Do While Not Wshshell.AppActivate ("VMware Workstation")
Wscript.sleep 1000
Loop
Wshshell.AppActivate "VMware Workstation"
Wshshell.SendKeys "%{F4}"

EDIT: Actually, this would only prevent the first VMware window and then quit, you would need to be re-write something that would stay running longer. But you get the idea.

Thank you for the script. I'll have a closer look at it.

Matthias

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.


×
×
  • Create New...