Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: fong21051
  • Order by date
  1. fong21051

    script to delete user profiles and data

    Hi, Please can someone help me with this as I am really stuck! For my code above I am receiving the following: Line 36, Char 6, Error: Permission denied. Line 36 is the line that deletes the "userdata" : objFSO.DeleteFolder(strUserData) It echoes me back telling me which userdata it wants to...
  2. fong21051

    script to delete user profiles and data

    Hi again. I'm really in a mess with this one. I found 2 problems, please see below: 1. I am receiving the following error: Line 36, Char 6, Error: Permission denied. Line 36 is the line that deletes the "userdata" : objFSO.DeleteFolder(strUserData) It echoes me back telling me which userdata it...
  3. fong21051

    script to delete user profiles and data

    Hi PHV man, thanks for your advice, on the takeown /? there is a parameter /A that allows me to take ownership as administrator. I put this in front of the /F and it seems to take ownership as administrator.It seems to have done the trick! I will further test this tomorrow to delete batches of...
  4. fong21051

    script to delete user profiles and data

    Hi PHV, thank you for your quick response. Do I just add /U /P switches after the TAKEOWN command like the line below: wshShell.Run "CMD /K TAKEOWN /F /U /P """ & strUserData & """ /R /D Y", 1, True Is this correct? Please may you confirm this as I am unsure of this. Many thanks.
  5. fong21051

    script to delete user profiles and data

    Hi PHV and Geates. Thank you both for your help on this. Geates, i'm sorry but I made a mistake. "Line 45, error: access denied" is refering to: objFSO.DeleteFolder(strUserData) and this line is suppose to delete the "profile folder" and NOT the "userdata folder" so my apologies for my mistake...
  6. fong21051

    script to delete user profiles and data

    Hi PHV, I'm not sure whats happened man, but when I run the script now, the command line interface will come up and I receive the following error: ''\\rcmutility\software\VB SCRIPT\Script to delete STUDENT AD accounts, profiles and userdata' CMD.EXE was started with the above path as the...
  7. fong21051

    script to delete user profiles and data

    Thank you or your response PHV. I will try this as I am back in work tomorrow (I was working on this script all evening today). I'm a junior programmer, so Im not sure how to use WScript.Echo May you give me an example? Many thanks!
  8. fong21051

    script to delete user profiles and data

    Hi, I want to start this as a new thread as I spent many hours and still couldn't work this one out. The script below deletes all the userprofiles and userdata of all those accounts in a specified AD OU. However I login to the File server that contains all the user profiles and userdata and run...
  9. fong21051

    VBScript to take ownership

    Hi Everyone, Just to let you know that this is now finally sort (not the first time I said this, but lets hope this is final time) I found out the reason why it isn't taking ownership is because the "profilepath" field in AD is not always specified in AD or is specified incorrectly with the...
  10. fong21051

    VBScript to take ownership

    Sorry, I forgot to add I login to the server to run the script as a Domain Admin so I should have full permissions
  11. fong21051

    VBScript to take ownership

    Hi guitarzan, Thank you for your extremely helpful advice. I have done what you said. Please see below answers to your questions 1. I login to the server that contains all the user profiles and userdata. 2. The script says "permission denied" and tells me which userdata my permission is...
  12. fong21051

    VBScript to take ownership

    Dear Sir/Madam, unfortunately no one has responded to me yet but I am still having issues :( When I run the script that Phylum has kindly written for me, I receive continuous error loops that does end that say the following: Error 70 occurred while trying to 'objFSO.DeleteFolder...
  13. fong21051

    VBScript to take ownership

    Hi Phylum, Ahhh, my apologies but I think I spoke too soon.. I have amended your script so it "Does not delete the user object from AD." I simply just remove that section from the script so it keeps the object in AD. But now I am getting continuous error loop that doesn't end saying: Error...
  14. fong21051

    VBScript to take ownership

    Hi Phylum, I would just like to say from what I test so far, it works like a gem! Thank you so much for all your time on assisting me, I really appreciate this. Happy Chinese New year to you too! Fong
  15. fong21051

    VBScript to take ownership

    Many thanks for your most helpful Phylum. I will test this and see how I go. Fong
  16. fong21051

    VBScript to take ownership

    Hi again PH, When I run the script and the command prompt, it only takes ownership permission of "one" of the profile folders. I want it to take permission of "all" the profile folders that have their AD account in the "student leavers" OU. please may you assist
  17. fong21051

    VBScript to take ownership

    Hi PH, thanks but I am still receiving the error permission is denied. I am not sure why this is because I have checked the properties of the folder and can see I have taken ownership permission of the folder. Im not sure shy I am still receiving this permission denied error
  18. fong21051

    VBScript to take ownership

    After the command prompt, I am still then receiving the error: Line: 26 Char: 5 Error: Permission denied.
  19. fong21051

    VBScript to take ownership

    Thanks PH, the command prompt started running and I can see I have taken ownership of one of the profile folders! But now it does not run the next line of script to delete this profile. It does not loop around. Many thanks for this step, but can you help fix this. Fong
  20. fong21051

    VBScript to take ownership

    Thanks for your speedy response. I have replaced the line: wshShell.Run "TAKEOWN /F """ & objUser.profilePath & """ /R /D O", 0, True With: wshShell.Run "CMD /K TAKEOWN /F """ & objUser.profilePath & """ /R /D O", 1, True I know receive the following error in command line...

Part and Inventory Search

Back
Top