Never mind, looking at this I answerd my Q:
http://blogs.msdn.com/b/ericlippert/archive/2004/08/19/error-handling-in-vbscript-part-one.aspx

Thanks again Carl!

Dave

From: David Lum [mailto:david....@nwea.org]
Sent: Wednesday, November 16, 2011 12:11 PM
To: NT System Admin Issues
Subject: RE: A hump-day puzzler

Ah, thanks. I have an "on error resume" next lower down in this script, do I 
put one above each line, or is that command a "for everything after this" and 
if I put it near the top it will apply to each line of code after it?

Dave

From: Carl Houseman 
[mailto:c.house...@gmail.com]<mailto:[mailto:c.house...@gmail.com]>
Sent: Wednesday, November 16, 2011 11:52 AM
To: NT System Admin Issues
Subject: RE: A hump-day puzzler

Slight code adjustment will help with this:

On error resume next
<thing that might cause an error you don't want users to see>
If err.num <> 0 Then
  Wscript.quit(1)
End If

Carl

From: David Lum [mailto:david....@nwea.org]<mailto:[mailto:david....@nwea.org]>
Sent: Wednesday, November 16, 2011 11:13 AM
To: NT System Admin Issues
Subject: A hump-day puzzler

Deployed the nifty "update machine description in AD" VBScript and it works 
great!

This morning, my director got this puzzling message (puzzling because you need 
to hit a DC for this GPO to run). The GPO has been rolled out for weeks and 
today is the first time she's seen this message, but I can see from AD it was 
successful yesterday.

"Windows Script Host"
Script: 
\\<domain\sysvol\domain\policies\<file:///\\%3cdomain\sysvol\domain\policies\> >
Line:      4
Char:     5
Error:     The specified domain either does not exist or could not be contacted
Code:    80070548
Source: (null)

Line 4 is: Set objUser = GetObject("LDAP://" & ad.UserName)

So it seems like there was either a network interruption that caused the LDAP 
lookup to time out or maybe the DC's were very busy at that time, but those are 
only SWAG's. Any ideas of where to look is welcome!
David Lum
Systems Engineer // NWEATM
Office 503.548.5229 // Cell (voice/text) 503.267.9764


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to 
listmana...@lyris.sunbeltsoftware.com<mailto:listmana...@lyris.sunbeltsoftware.com>
with the body: unsubscribe ntsysadmin

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to listmana...@lyris.sunbeltsoftware.com
with the body: unsubscribe ntsysadmin

Reply via email to