Friday, January 09, 2009
Deployment Forum HomeDeployment Forum ArticlesDeployment Forum Download LibraryDeployment Forum Member BlogsDeployment Forum Community Forums
Member Login
StandardLiveID


Register
Forgot Password ?



Guests can view and read messages in the community forums, but you must register and log in to Deployment Forum before you can post messages. Click Register at the top of this page. Before posting messages, please read the forum guidelines at the bottom of this page.

Subject: UserExit Script - How to force a failure?
Prev Next
You are not authorized to post a reply.

AuthorMessages
brenthunter2005User is Offline

Posts:12

Send Message
08/26/2008 6:28 AM  

Hello all,

 

We currently have a UserExit script defined that configures several properties etc.  

 

If the script does not configure these properties correctly, we would like to report a failure to MDT and hence stop any further processing and MDT should fail and simply display the summary screen with a failure.

 

How do we complete this? 

PyrosoftUser is Offline

Posts:48

Send Message
08/26/2008 8:51 AM  
Try adding this line to the script

 

oLogging.CreateEntry "Error doing **fill in your message here**", LogTypeError


brenthunter2005User is Offline

Posts:12

Send Message
08/26/2008 8:53 AM  

Hello Pyrosoft,

 

I have tried adding this line to the function, but this does not work.

 

How much do you actually know about the specific UserExit function?  I ask because from the templates I've seen, there is always a line that says "UserExit = Success", yet this function doesn't get used for anything.  Whenever you want to create new scripts/functionality with the UserExit script, it's always created in a new function.

 

 

GSimardUser is Offline

Posts:2

Send Message
09/04/2008 1:03 PM  

I have been using the UserExit mechanism since BDD 2.5 and it works just fine ... MDT 2008 included. The UserExit() function only has to return a non 0 RC to cause the process to stop.

Use this template;

Function UserExit(sType, sWhen, sDetail, bSkip)

 oLogging.CreateEntry "USEREXIT : Type=" & sType & " When=" & sWhen & "  Detail=" & sDetail, LogTypeInfo

 UserExit = PerformSomeWork(sType, sWhen, sDetail, bSkip)

End Function

 

PerformSomeWork() returns either "Success" or "Failure"

 

brenthunter2005User is Offline

Posts:12

Send Message
09/05/2008 5:39 AM  
Thank you very much GSimard!  Cheers!
You are not authorized to post a reply.
Forums > Deployment Solutions > MDT 2008 > UserExit Script - How to force a failure?



ActiveForums 3.7
Forum Policies
Minimize

These forums are a user-supported community for IT professionals to exchange deployment tips, solutions, and techniques. For the benefit of all Deployment Forum members, please observe the following guidelines when posting to these forums:

  • We reserve the right to remove any message. Our moderators will remove all messages that are not respectful or productive. Profanity, racism, prejudice, and flaming are not tolerated.
  • Do not advertise products or services. Our moderators will remove all advertisements or service announcements. Product and service recommendations from active Deployment Forum members are encouraged, however.
  • Make sure your question isn't already answered. Before posting questions, search the forums. After ensuring that your questions are unique, post them to the most appropriate forum. This will help reduce noise in the forums.
  • Help make the most of each thread. Do not post unrelated messages to a thread. Also, if you've resolved a question outside of these forums, please share the solution with other members by posting it back to the thread.
  • Do not share confidential information. Confidential information includes product keys and addresses. Our moderators will edit any message containing confidential information, so double-check messages and their attachments before posting them.
  • Post messages using only the English language. For the benefit of all Deployment Forum members, please post your messages using the English language.

We hope that you enjoy using this community. Please submit your comments and feedback on the Comments and Feedback page or post them to the Comments, Feedback forum.



Privacy Statement  |  Terms Of Use
© 2007 Jerry Honeycutt