Jump to content

Recommended Posts

Posted

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

Posted
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.

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



×
×
  • Create New...