Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Err.Number = 424 Object Required

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,37968
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Err.Number = 424 Object Required
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Err.Number = 424 Object Required - 9/21/2006 3:35:45 AM   
  higgledy

 

Posts: 3
Score: 0
Joined: 9/21/2006
Status: offline
homedir = to absolate home dir pulled from Active Directory (from previous step)
const PROGRAMFILES = "\Program Files"


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


On my development enviroment this works fine. In my production environment, it returns Err.Number = 424, each and everytime. 
There is a chance that my permissions may not be the same in "prod" as they are in "dev" but I am able to other, similar, actions in prod via a different script.

I guess I am asking if anyone sees something wrong with my script?
Is there anyway a permissions problem can cause an 424 error?


Thanks,

Higgledy
 
 
Post #: 1
 
 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!

(in reply to higgledy)
 
 
Post #: 2
 
 RE: Err.Number = 424 Object Required - 9/21/2006 12:12:59 PM   
  higgledy

 

Posts: 3
Score: 0
Joined: 9/21/2006
Status: offline
I do have this
      

I just omitted it from my first post.

(in reply to mikeock)
 
 
Post #: 3
 
 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

(in reply to higgledy)
 
 
Post #: 4
 
 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

(in reply to higgledy)
 
 
Post #: 5
 
 RE: Err.Number = 424 Object Required - 9/22/2006 1:26:36 AM   
  higgledy

 

Posts: 3
Score: 0
Joined: 9/21/2006
Status: offline
Snipah, I checked the out from AD it is perfect. In fact, I logged the value, then cut and pasted it into exploer and it resolved to the user's home directory as it should.

I am still stuck on this being a permissions problem, but why is the Err.Number returned a "424" and not a permissions error code?

(in reply to gdewrance)
 
 
Post #: 6
 
 RE: Err.Number = 424 Object Required - 9/22/2006 1:45:06 AM   
  ebgreen


Posts: 4613
Score: 31
Joined: 7/12/2005
Status: offline
I believe that seeing all of your code would help.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to higgledy)
 
 
Post #: 7
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Err.Number = 424 Object Required Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts