Search found 54 matches

by jdelatorre@hfinc.com
Wed Dec 05, 2007 4:02 am
Forum: VBScript
Topic: Out of Memory Error on Recursive Sub
Replies: 3
Views: 1607

Out of Memory Error on Recursive Sub

Just a long shot but what I did notice is that your recreating your Registry object every time the sub is called. You only need to do this once outside the sub. so putting the below line outside the subroutine is only necessary. It shouldnt matter but thats one thing that jumped out at me. Set objRe...
by jdelatorre@hfinc.com
Fri Nov 16, 2007 2:12 am
Forum: VBScript
Topic: Delete and Copy file for logged-in user profile
Replies: 2
Views: 1074

Delete and Copy file for logged-in user profile

this should get you started. Set objFSO = CreateObject("Scripting.FileSystemObject") arrFilesToDelete = array("deleteMe1.xml","deleteMe2.xml")' path to files to copyarrFilesToCopy = Array("c:copyMe1.xml","c:copyMe2.xml") strComputer = InputBox("Remote Computer") user=loggedonUser(strComputer)profile...
by jdelatorre@hfinc.com
Fri Nov 16, 2007 1:00 am
Forum: VBScript
Topic: User Backup Script
Replies: 6
Views: 2300

User Backup Script

What you can do is use portions of the script above (to get the logged on user, and set the users home network folder to copy to) and feed into the script appropiate Robocopy or Xcopy switches. Since you are going to run this against multiple machines then I would go with Robocopy as it is a little ...
by jdelatorre@hfinc.com
Thu Nov 15, 2007 6:43 am
Forum: VBScript
Topic: User Backup Script
Replies: 6
Views: 2300

User Backup Script

doh! forgot about Xcopy.Now that Jim has knocked my brain cobwebs loose. Robocopy is also an option for you too. type robocopy /? at the cmd prompt for avail switches.
by jdelatorre@hfinc.com
Thu Nov 15, 2007 6:16 am
Forum: VBScript
Topic: User Backup Script
Replies: 6
Views: 2300

User Backup Script

This should get you started. Didnt do any testing as I dont have the environment or time at the moment. strComputer = InputBox("Enter Computer Name") If IsEmpty(strComputer) Then WScript.Quit End If Set objFso = CreateObject("Scripting.FileSystemObject")crtUser= loggedonUser(strComputer) dstFolder =...
by jdelatorre@hfinc.com
Mon Nov 12, 2007 7:34 am
Forum: VBScript
Topic: Add Domain Global Group to Local Wks admin group
Replies: 4
Views: 2886

Add Domain Global Group to Local Wks admin group

Jeff is probably too busy to give you the exact command but he probably meant. Looking forward to V2 of Don and yours Powershell TFM. Keep up the good workpsexec @computers.txt net localgroup administrators "domainhelp desk" /addJoel
by jdelatorre@hfinc.com
Tue Nov 06, 2007 3:52 am
Forum: VBScript
Topic: Copying a file to several folders
Replies: 3
Views: 1279

Copying a file to several folders

nothing major wrong here, just minor syntax errors. this line needs a trailing "" dstFolder = "Application DataMicrosoftInternet ExplorerFavorites" change to dstFolder = "Application DataMicrosoftInternet ExplorerFavorites" this doesn't Set objFolder = objFSO.GetFolder("C:tomTesthqusers") change to ...
by jdelatorre@hfinc.com
Tue Nov 06, 2007 3:23 am
Forum: VBScript
Topic: Copying a file to several folders
Replies: 3
Views: 1279

Copying a file to several folders

Looks like the path is not being built correctly.

Show me the code you have.
by jdelatorre@hfinc.com
Tue Nov 06, 2007 1:29 am
Forum: VBScript
Topic: Copying a file to several folders
Replies: 3
Views: 1279

Copying a file to several folders

Err. My Bad.

Change this Line

objFSO.CopyFile srcFile,"x:"&folder&dstFolder

to

objFso.copyfile srcfile, "x:"& folder.name & dstFolder
by jdelatorre@hfinc.com
Mon Nov 05, 2007 7:44 am
Forum: VBScript
Topic: Add Domain Global Group to Local Wks admin group
Replies: 4
Views: 2886

Add Domain Global Group to Local Wks admin group

LG.exe is great tool for just this. Its a command line tool but you can easily create a batch file to automate this. You can find and download it here.http://www.joeware.net/freetools/tools/lg/index.htm