General discussion

Locked

remove data on exit

By Khalid_Butt ·
i need advise on deleting data on a directory C immediately after it has been viewed, in addition the cache needs to be periodically and freequently purged.

can anyone assist approx 6000 pc's

can this be done via group policy if so i need an example please

thanks guys/gals

This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by rpreuss In reply to remove data on exit

It would be simple enough to create a log on or log off script to delete the files in question. And it could easily be enforced using Group Policy. The only thing is it wouldn't be deleted immediately after being viewed, it would be deleted on logout, or log on or start up or shutdown of the PC.

Here is some code as an example:

<%
dim filesys, demofile
set filesys = CreateObject("Scripting.FileSystemObject")
set demofile = filesys.GetFile("c:\somefile.txt")
demofile.Delete
%>

You can put this into a text file, save it with a .vbs extension then add it to group policy in the log off (UserConfiguration, Windows Settings, Scripts), or shutdown (computer Configuration, Windows Settings, Scripts) scripts section.

Back to Windows Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums