Login | |
|
 |
RE: Err.Number = 424 Object Required - 9/21/2006 3:39:55 AM
|
|
 |
|
| |
mikeock
Posts: 124
Score: 1
Joined: 6/8/2006
Status: offline
|
Set objFolder = objFSO.GetFolder(homedir) The above line does not initalize the filesystem object. Add this above that Set objFSO = CreateObject("Scripting.FileSystemObject")
_____________________________
My sig sucks!
|
|
| |
|
|
|
 |
RE: Err.Number = 424 Object Required - 9/21/2006 5:13:56 PM
|
|
 |
|
| |
Snipah
Posts: 1343
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
|
I ran your script with the var homedir being "F:\" and it worked.... I think you better do a check on the output from AD rather then looking at the script, b/c that seems to be working... Good luck... PS. If you need help with your AD output, please post your full script/side scripts that contribute to this output S.
_____________________________
For more information, please see the "Read me First" topic. http://www.visualbasicscript.com
|
|
| |
|
|
|
 |
RE: Err.Number = 424 Object Required - 9/21/2006 6:10:41 PM
|
|
 |
|
| |
gdewrance
Posts: 587
Score: 3
Joined: 3/16/2006
Status: offline
|
I agree with Snipah I ran the following and it worked homedir = "d:" const PROGRAMFILES = "\Program Files" Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFolder = objFSO.GetFolder(homedir) If Not objFSO.FolderExists(objFolder & PROGRAMFILES ) Then objFolder.SubFolders.Add("programfiles") If Err.Number <> 0 Then objStream.WriteLine "Cannot create programfiles directory: " & Err.Number WScript.Quit Err.Number End If End If
|
|
| |
|
|
|
|
|