FN-GM Posted November 16, 2007 Posted November 16, 2007 Hi, There is a program that someone runs and the cache (40mb) is stored in the users profile, so when the user logs off it uploads this rather large file to the server (Roaming Profiles). How do i make a script so the folder is deleted before the transfer to the server is starts please? Thanks Z
mattx Posted November 17, 2007 Posted November 17, 2007 Log off script ? Or a script which launches the program instead of the normal exe, loops round until the process is closed, when its closed [ the condition is met ] delete the files. You could use AutoITs ProcessExists function, then the FileDelete.
FN-GM Posted November 17, 2007 Author Posted November 17, 2007 Just a script that will delete a folder at log off. Z
Ric_ Posted November 17, 2007 Posted November 17, 2007 Save this as a batch script and add as a logoff script in a GPO... @echo off echo Deleting cache... if exist rd /S /Q The above may need some revising. It's always hard to remember dos commands when you're on a linux box
mattx Posted November 17, 2007 Posted November 17, 2007 The above may need some revising. It's always hard to remember dos commands when you're on a linux box Would Wine help ?
mattx Posted November 17, 2007 Posted November 17, 2007 @mattx: Beer might And a shot of Smirnoff..... Funny thing logoff scripts - I have never had the need to apply one. I am searching the cobwebs of my brain trying to think of how our network / setup would need one. There must be a need somewhere !!! I want to use one now....
FN-GM Posted November 17, 2007 Author Posted November 17, 2007 How could i make it so it deletes the folder from the profile for whoever is logged on? Thanks Z
mattx Posted November 17, 2007 Posted November 17, 2007 How could i make it so it deletes the folder from the profile for whoever is logged on? Use the %username% in batch or the @UserName marco in AutoIT.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now