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: modelalias setup
Prev Next
You are not authorized to post a reply.

AuthorMessages
bn2huntUser is Offline

Posts:95

Send Message
06/20/2008 11:14 AM  

What log files do I  look at to see if my userexit script is working or more inportantly why it isn't.  It seems to ignore my modelalias variable and runs the default install everytime.

 Here is my customsettings.ini

[Settings]
Priority= setmodel, CSettings ,  CRoles , MMSettings , MMApps , RApps , RAdmins , Default
Properties= modelalias

[setmodel]
Modelalias = #setmodelalias()#
userexit = userexit.vbs


[Default]
Deployroot=\\wdsserver\distribution$
SQLServer=wdsserver
Database=wdddatabase
Netlib=DBNMPNTW
SQLShare=wddshare
OSInstall=Y
SkipAdminPassword=YES
SkipProductKey=YES
TimeZone=020
TimeZoneName= Central Standard Time
KeyboardLocal = 0409:0000049
_SMSTSOrgName= EMC Insurance Co
SLShare=\\wdsserver\logs\default\%serialnumber%
UserDataLocation=NONE
SkipAppsOnUpgrade=YES
SkipCapture=YES


[CSettings]
SQLServer=wdsserver
Database=wdddatabase
Netlib=DBNMPNTW
SQLShare=wddshare
Table=ComputerSettings
Parameters=UUID, AssetTag, SerialNumber, MacAddress
ParameterCondition=OR

[CRoles]
SQLServer=wdsserver
Database=wdddatabase
Netlib=DBNMPNTW
SQLShare=wddshare
Table=ComputerRoles
Parameters=UUID, AssetTag, SerialNumber, MacAddress
ParameterCondition=OR

[RApps]
SQLServer=wdsserver
Database=wdddatabase
Netlib=DBNMPNTW
SQLShare=wddshare
Table=RoleApplications
Parameters=Role
Order=Sequence

[RAdmins]
SQLServer=wdsserver
Database=wdddatabase
Netlib=DBNMPNTW
SQLShare=wddshare
Table=RoleAdministrators
Parameters=Role

[MMSettings]
SQLServer=wdsserver
Database=wdddatabase
Netlib=DBNMPNTW
SQLShare=wddshare
Table=MakeModelSettings
Parameters=Make, modelalias
modelalias = model

[MMApps]
SQLServer=wdsserver
Database=wdddatabase
Netlib=DBNMPNTW
SQLShare=wddshare
Table=MakeModelApplications
Parameters=Make, modelalias
modelalias = model
Order=Sequence

 

Here is my userexit.vbs


Function UserExit(sType, sWhen, sDetail, bSkip)
 oLogging.CreateEntry "entered UserExit ", LogTypeInfo
     UserExit = Success
End Function

Function setmodelalias()
 oLogging.CreateEntry "Entered UserExit Function 'setmodelalias'", LogTypeInfo\
 On Error Resume Next
 model = oEnvironment.item("Model")
 Select Case model
  Case "646557u","6463WA7","6463W9P"
   setmodelalias = "t61"
   ologging.createentry = "userexit - setmodelalias has been set to " & setmodelalias,logtypeinfo
  Case "20077JU","1953DAU","1953D7U"
   setmodelalias = "t60"
   ologging.createentry = "userexit - setmodelalias has been set to " & setmodelalias,logtypeinfo
  Case "1859BAU","18595RU","1859B9U"
   setmodelalias = "r52"
   ologging.createentry = "userexit - setmodelalias has been set to " & setmodelalias,logtypeinfo
  Case "1836BAU","1836Q4U"
   setmodelalias = "r51"
   ologging.createentry = "userexit - setmodelalias has been set to " & setmodelalias,logtypeinfo
  Case "E-295C"
   setmodelalias = "e-295c"
   ologging.createentry = "userexit - setmodelalias has been set to " & setmodelalias,logtypeinfo
  Case "M285-E"
   setmodelalias = "M285-E"
   ologging.createentry = "userexit - setmodelalias has been set to " & setmodelalias,logtypeinfo
  Case Else
   setmodelalias = model
   ologging.createentry = "userexit - setmodelalias has not been changed " & model ,logtypeinfo
 End Select
 On Error goto 0
End Function


Function GetWDSServerName()
 oLogging.CreateEntry "Entered UserExit Function 'GetWDSServerName'", LogTypeInfo
     On Error Resume Next
 oShell.run "wpeutil updatebootinfo", 1, True
 sWDSServerName = oShell.RegRead("HKLM\System\CurrentControlSet\Control\PEBootServerName")
     sWDSServerName = Left(sWDSServerName, InStr(sWDSServerName ,".")-1)
     oLogging.CreateEntry "WDSServerName = " & sWDSServerName, LogTypeInfo
 oLogging.CreateEntry "Exiting UserExit Function 'GetWDSServerName'", LogTypeInfo
     GetWDSServerName = sWDSServerName
 On Error goto 0
End Function

Thanks for any input

 

Dan

bn2huntUser is Offline

Posts:95

Send Message
06/23/2008 7:53 AM  

I am getting an error in the bdd.log file

unable to parse user exit script

Any ideas what this means.  I'm not getting very far with google.

KonradUser is Offline

Posts:67

Send Message
06/23/2008 6:17 PM  
Looking at the source code for ZTIGather.wsf, this error message seems to come from line 1835. This means that it has already found and read the file, but when it tries to perform a call to ExecuteGlobal on it, it fails.

Was there more info in that error message? ZTIGather.wsf should be outputing something like:
ERROR raised in User Exit: error description (error number)

It's most likely some kind of syntax error or typo.

I notice that in your "setmodelalias()" function, on the first line of the function it shows it ending with "LogTypeInfo\", should this have the backslash? Or is this just an artifact of the forum.. This could be your problem.

Cheers.
bn2huntUser is Offline

Posts:95

Send Message
06/24/2008 9:19 AM  
I had some problems getting the whole error to paste and stay in the message. It would show up in the edit box and then be gone when I posted the message. But yes the "logtypeinfo\" was one of several syntax related problems. That was one of those that no matter how long I stared at the script it just wasn't popping out at me so thank you very much for your help.

It is working great now.

Dan
You are not authorized to post a reply.
Forums > Deployment Solutions > MDT 2008 > modelalias setup



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