Hi I am trying to write a script to empty users Bins at logoff. I must confess my scriping knowledge is pretty much non existant so I have been cytting bits from other scripts which we have
What I have got so ar is
I have saved it as a bat but it does not seem to work. I would prefer to ue Vbscript. Howver when saved as a VB script it errors.Code:'Script to Empty the recycle Bin on Logoff. 'Get User DN Set objSysInfo = CreateObject("ADSystemInfo") strUser = objSysInfo.UserName If InStr(strUser, "Staff") Then DEL \\rhs-svr-001\staff$\%username%\RECYCLER\*.* End If If InStr(strUser, "Year02") Then DEL \\rhs-svr-001\year02$\%username%\RECYCLER\*.* End If If InStr(strUser, "Year03") Then DEL \\rhs-svr-001\year02$\%username%\RECYCLER\*.* End If If InStr(strUser, "Year04") Then DEL \\rhs-svr-003\year02$\%username%\RECYCLER\*.* End If If InStr(strUser, "Year05") Then DEL \\rhs-svr-003\year02$\%username%\RECYCLER\*.* End If If InStr(strUser, "Year06") Then DEL \\rhs-svr-001\year02$\%username%\RECYCLER\*.* End If If InStr(strUser, "Year07") Then DEL \\rhs-svr-001\year02$\%username%\RECYCLER\*.* End If If InStr(strUser, "Year08") Then DEL \\rhs-svr-003\year02$\%username%\RECYCLER\*.* End If If InStr(strUser, "Year09") Then DEL \\rhs-svr-001\year02$\%username%\RECYCLER\*.* End If 'Terminate script and engine WScript.Quit
Any help is apreciated
nN


LinkBack URL
About LinkBacks




