+ Post New Thread
Results 1 to 5 of 5
Scripts Thread, Target all Users in Coding and Web Development; I trying to changed this script so that it perfoms the action for all users instead of just the person ...
  1. #1

    Join Date
    May 2008
    Posts
    14
    Thank Post
    9
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Target all Users

    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

  2. #2

    Michael's Avatar
    Join Date
    Dec 2005
    Location
    Birmingham
    Posts
    9,262
    Thank Post
    242
    Thanked 1,572 Times in 1,252 Posts
    Rep Power
    340
    If you're referring to profiles, it's:

    Code:
    %ALLUSERSPROFILE%\Desktop
    Code:
    %ALLUSERSPROFILE%\Start Menu

  3. #3

    Join Date
    May 2008
    Posts
    14
    Thank Post
    9
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Ok, and this will clear the target folder for anyone who logs on, correct.

  4. #4

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,859
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    182
    Only if they have permission to do so.

  5. #5

    Michael's Avatar
    Join Date
    Dec 2005
    Location
    Birmingham
    Posts
    9,262
    Thank Post
    242
    Thanked 1,572 Times in 1,252 Posts
    Rep Power
    340
    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.

SHARE:
+ Post New Thread

Similar Threads

  1. (Free?) iSCISI / AoE target/server for end-user OS
    By dhicks in forum Wireless Networks
    Replies: 9
    Last Post: 27th April 2008, 05:25 PM
  2. Chinese army hackers 'target Whitehall'
    By FN-GM in forum IT News
    Replies: 0
    Last Post: 5th September 2007, 11:49 PM
  3. Target Tracker without MS Office! Is it possible!
    By CM786 in forum Educational Software
    Replies: 6
    Last Post: 5th May 2007, 07:53 AM
  4. CMIS - Cannot edit target grades?
    By _Bat_ in forum MIS Systems
    Replies: 4
    Last Post: 2nd November 2006, 10:25 AM
  5. WMI filter to target SMARTboard software install
    By ajbritton in forum Windows
    Replies: 8
    Last Post: 15th August 2006, 08:30 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •