soze Posted May 30, 2008 Posted May 30, 2008 I trying to changed this script so that it perfoms the action for all users instead of just the person that is logged on. What do I have to change the "userProfile" to? Thx for the Help Dim objWSHShell :Set objWSHShell = CreateObject("WScript.Shell") Set objFSO = WScript.CreateObject("Scripting.FileSystemObject") DocumentumDir = ExpandEvnVariable("userProfile") & "\Documentum\" If objFSO.folderExists(DocumentumDir & "ucf") Then If objFSO.folderExists(DocumentumDir & "ucf.old") Then objFSO.deleteFolder(DocumentumDir & "ucf.old") End If objFSO.MoveFolder DocumentumDir & "ucf" , DocumentumDir & "ucf.old" End If ''_______________________________________________________________________________________________________________________________ Function ExpandEvnVariable(ExpandThis) ExpandEvnVariable = objWSHShell.ExpandEnvironmentStrings("%" & ExpandThis & "%") End Function
Michael Posted May 30, 2008 Posted May 30, 2008 If you're referring to profiles, it's: %ALLUSERSPROFILE%\Desktop %ALLUSERSPROFILE%\Start Menu
soze Posted May 30, 2008 Author Posted May 30, 2008 Ok, and this will clear the target folder for anyone who logs on, correct.
Michael Posted May 30, 2008 Posted May 30, 2008 Sorry I mis-understood. The %ALLUSERSPROFILE% variable is the All Users folder. I'm not sure what the variable should be for any user profile. There is a difference.
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