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: The Make, the Model, and the Lazy Computer Company
Prev Next
You are not authorized to post a reply.

AuthorMessages
SieversUser is Offline

Posts:18

Send Message
07/31/2008 12:35 PM  

Ok, here is my problem... when querying WMI on some older equipment that we have, I recieve multiple results for the same exact make and model of PC.  Here are some of my examples:

Gateway E-4500S

Good Manufacture Result:  Gateway

Good Model Result: E-4500S

Bad Manufacture Result: GATEWA

Bad Model Result: SYSTEM_, or 05DT048_

Other Bad Model Results are Phantom and Orion.  It seems as all of our different types of Gateway PCs are plagued with this inconsistent naming scheme.  We have recently switched to HP and so far so good other than one odd ball 6910p that came up as an NC65xx.  I'm hoping this is a one time fluke.

So how do I fix this?  I am currently using SQL Express for Make and Model information.  Is there a way similar to Ben Hunter's fix http://blogs.technet.com/benhunter/archive/2007/03/28/bdd-2007-tips-creating-model-aliases.aspx  that would allow me to associate these broken make / model variables to the standard variable?  Maybe a userexit script that states If Make = GATEWA replace with Gateway.  And then something similar to use for model numbers.

bn2huntUser is Offline

Posts:95

Send Message
08/01/2008 2:51 PM  
Are your results consistent between models or do you get the same results for different models?  Like the result system_ do you only get that with the E-4500S or with multiple models?  

With the lenovo/Ibms that we have the same model could have 4-5 different valid model numbers returned.  I used a case statement in the userexit script to allow for the different model numbers returned and then set the model to the correct model in my task sequences. 

 Userexit.vbs

[code]
Function setmodelalias ()
    logfile = "\\????\logs\newmodel.txt"
    Set FS = CreateObject ("Scripting.FileSystemObject")
    Set ws = CreateObject ("WScript.Shell")
    oLogging.CreateEntry "Entered UserExit Function setmodelalias" , LogTypeInfo
    oLogging.CreateEntry "UserExit Function: model=" & oEnvironment.item ("Model") , LogTypeInfo
    On Error Resume Next
   
    Select Case LCase (oEnvironment.item ("Model"))
        Case "646557u" , "6463wa7" , "6463w9p" , "6465cto"
            setmodelalias = "t61"
            ologging.createentry "userexit - setmodelalias has been set to t61" , logtypeinfo
[/code]
SieversUser is Offline

Posts:18

Send Message
08/04/2008 6:30 PM  

This worked great!!!  Had to modify it a bit.... still not fully done putting all the obscure model numbers in.  Your other post helped me figure out the customsettings.ini.  Located here for others to reference:

http://www.deploymentforum.com/Community/Forums/tabid/124/forumid/16/tpage/1/view/topic/postid/1238/Default.aspx#1238

Also when I get my script fully running with both Make & Model Aliases I'll post the script and customsettings.ini for others.  Thanks again for posting this script!!!

bn2huntUser is Offline

Posts:95

Send Message
08/05/2008 6:16 AM  

Sorry didn't think to post the customsettings.ini file .  That was the hardest part for me to figure out.  I have modified it from the post that you reference.  Here is the actual file that I am  using.

customsetting.ini[code]

[Settings]
Priority= wdsalias, setmodel, MMSettings , MMApps , Default
Properties= modelalias,wdsalias

[wdsalias]
wdsalias = #GetWDSServerName()#
userexit = userexit.vbs

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

[Default]
Deployroot=\\%wdsserver%\distribution$
SQLServer=%wdsserver%
Database=wddinfo
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

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

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

SieversUser is Offline

Posts:18

Send Message
08/06/2008 7:56 PM  

No problem.  Here is what I came up with, but now I am getting a weird issue of half my applications that are stored in the Make / Model database not getting installed.  One model will install 3 of the 6 apps, then continue on to my option apps, and then any apps set in the task sequence.  This seems to be only happening on the Production_Server (Deploy \ Deploy$) and not my MasterMDTServer (LAB \ Distribution$).  The MasterMDTServer has SQL Express on it, Production_Server does not.  I pushed the Deploy$ to the Production_Server and it points back at the MasterMDTServer for SQL queries.  Hope this make sense.  Anyone have a clue what I am doing wrong?  Here are my two files:

userexit.vbs

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

Function setmakealias ()
    logfile = "%temp%\MDT_Make.log"
    Set FS = CreateObject ("Scripting.FileSystemObject")
    Set ws = CreateObject ("WScript.Shell")
    oLogging.CreateEntry "Entered UserExit Function setmakealias" , LogTypeInfo
    oLogging.CreateEntry "UserExit Function: model=" & oEnvironment.item ("Manufacture") , LogTypeInfo
    model = oEnvironment.item ("Manufacture")
    On Error Resume Next
  
    Select Case model
        Case "GATEWA"
            setmakealias = "Gateway"
            ologging.createentry "userexit - setmakealias has been set to Gateway" , LogTypeInfo      
        Case Else
      setmodelalias = Make
      ologging.createentry "userexit - setmakealias has not been changed. Make: " & Make, LogTypeInfo
    End Select
    On Error GoTo 0
End Function

Function setmodelalias ()
    logfile = "%temp%\MDT_Model.log"
    Set FS = CreateObject ("Scripting.FileSystemObject")
    Set ws = CreateObject ("WScript.Shell")
    oLogging.CreateEntry "Entered UserExit Function setmodelalias" , LogTypeInfo
    oLogging.CreateEntry "UserExit Function: model=" & oEnvironment.item ("Model") , LogTypeInfo
    model = oEnvironment.item ("Model")
    On Error Resume Next
  
    Select Case model
        Case "E-4500D"
            setmodelalias = "E-4500S"
            ologging.createentry "userexit - setmodelalias has been set to E-4500S" , LogTypeInfo      
        Case "E4610", "E-4610D", "E4610D SB", "SYSTEM__"
            setmodelalias = "E-4610S"
            ologging.createentry "userexit - setmodelalias has been set to E-4610S" , LogTypeInfo 
        Case "Gateway E100-M", "E100"
            setmodelalias = "E-100M"
            ologging.createentry "userexit - setmodelalias has been set to E-100M" , LogTypeInfo
        Case "Gateway M255"
            setmodelalias = "M255-E"
            ologging.createentry "userexit - setmodelalias has been set to M255-E" , LogTypeInfo                              
        Case "Gateway Mystique-C", "Gateway M465"
            setmodelalias = "M465-E"
            ologging.createentry "userexit - setmodelalias has been set to M465-E" , LogTypeInfo  
        Case "N2DTM026"
            setmodelalias = "M685-E"
            ologging.createentry "userexit - setmodelalias has been set to M685-E" , LogTypeInfo 
        Case "Gateway Orion"
            setmodelalias = "E-265M"
            ologging.createentry "userexit - setmodelalias has been set to E-265M" , LogTypeInfo             
        Case "Gateway Phantom"
            setmodelalias = "E-475M"
            ologging.createentry "userexit - setmodelalias has been set to E-475M" , LogTypeInfo
'        Case ""
'            setmodelalias = "HP Compaq dc7800p Small Form Factor"
'            ologging.createentry "userexit - setmodelalias has been set to HP Compaq dc7800p Small Form Factor" , LogTypeInfo
'        Case ""
'            setmodelalias = "HP Compaq 2510p Notebook PC"
'            ologging.createentry "userexit - setmodelalias has been set to HP Compaq 2510p Notebook PC" , LogTypeInfo
        Case "nc65xx"
            setmodelalias = "HP Compaq 6910p"
            ologging.createentry "userexit - setmodelalias has been set to HP Compaq 6910p" , LogTypeInfo
        Case Else
      setmodelalias = model
      ologging.createentry "userexit - setmodelalias has not been changed. Model: " & model, LogTypeInfo
    End Select
    On Error goto 0
End Function

CustomSettings.ini (This is the production server's ini)(Changes for Make / Model are in Red)(Changes to get the database to work with optional applications in Blue)

[Settings]
Priority= SetMake, SetModel, RAdmins, MMSettings, MMApps, MMRoles, RSettings, RApps, Default
Properties=modelalias

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

[SetMake]
Makealias = #setmakealias()#
userexit = userexit.vbs

[Default]
OSInstall=Y
UserDataLocation=NONE
SkipAppsOnUpgrade=NO
SkipAdminPassword=YES
SkipBDDWelcome=Yes
DeployRoot=\\Production_Server\deploy$
UserID=
UserPassword=
UserDomain=FBDomain
JoinDomain=FBDomain
UserDataLocation=NONE
SkipComputerName=No
SkipCapture=YES
SkipProductKey=YES
SkipDomainMembership=NO
SkipUserData=YES
SkipSummary=NO
_SMSTSORGNAME=Company

[MMSettings]
SQLServer=MasterMDTServer
Instance=SQLExpress
Database=MDTSQL01
Netlib=DBNMPNTW
SQLShare=distribution$
Table=MakeModelSettings
Parameters=Makealias, Modelalias
Makealias=Make
Modelalias=Model

[MMApps]
SQLServer=MasterMDTServer
Instance=SQLExpress
Database=MDTSQL01
Netlib=DBNMPNTW
SQLShare=distribution$
Table=MakeModelApplications
Parameters=Makealias, Modelalias
Order=Sequence
MandatoryApplications=Applications
Makealias=Make
Modelalias=Model


[MMRoles]
SQLServer=MasterMDTServer
Instance=SQLExpress
Database=MDTSQL01
Netlib=DBNMPNTW
SQLShare=distribution$
Table=MakeModelRoles
Parameters=Makealias, Modelalias
Makealias=Make
Modelalias=Model

[RSettings]
SQLServer=MasterMDTServer
Instance=SQLExpress
Database=MDTSQL01
Netlib=DBNMPNTW
SQLShare=distribution$
Table=RoleSettings
Parameters=Role

[RApps]
SQLServer=MasterMDTServer
Instance=SQLExpress
Database=MDTSQL01
Netlib=DBNMPNTW
SQLShare=distribution$
Table=RoleApplications
Parameters=Role
Order=Sequence

[RAdmins]
SQLServer=MasterMDTServer
Instance=SQLExpress
Database=MDTSQL01
Netlib=DBNMPNTW
SQLShare=distribution$
Table=RoleAdministrators
Parameters=Role

SieversUser is Offline

Posts:18

Send Message
08/08/2008 8:16 AM  
Never mind.  Found out what my problem was.  User rights got messed up under the applications.  Some of the installs are Install Shield and need to have modify rights to update the setup.log.  The above CS.ini and UserExit Script work perfectly.  Thanks again to all that helped solve my issue.  MDT with SQL is working great now.
You are not authorized to post a reply.
Forums > Deployment Solutions > MDT 2008 > The Make, the Model, and the Lazy Computer Company



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