none
UserExit script return system info RRS feed

  • Question

  • I want to get vbs msg, that returns system info before selecting task sequence in MDT.

    Currently using UserExit script.

    Deployment rules:

    [Settings]
    Priority=Default
    Properties=MyCustomProperty

    [Default]
    OSInstall=Y

    UserExit script = msg.vbs

    SkipCapture=YES
    SkipAdminPassword=YES
    SkipBDDWelcome=YES
    SkipProductKey=YES

    ......

    msg.vbs

    ______

    ' System info
    Function UserExit()
    UserExit = Success

    End Function

    Function msg ()
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    ' --- script to display cpu, ram, hdd ......

    End Function

    _________

    However if once deployment starts - all other rules are ignored, like:

    SkipCapture=YES
    SkipAdminPassword=YES
    SkipBDDWelcome=YES
    SkipProductKey=YES
    SkipComputerBackup=YES
    SkipBitLocker=YES
    SkipUserData=YES
    SkipSummary=YES

    Any help with that?

    I guess that there is issue with msg.vbs functions

    Thursday, October 9, 2014 5:26 PM

All replies

  • It needs to be set as

    UserExit=msg.vbs

    Not

    UserExit script=msg.vbs

    The UserExit script is designed to be used to manipulate variables within the CustomSettings.ini. If you simply want to display something on screen, why not just add the script as a step in the Task Sequence?

    Friday, October 10, 2014 12:28 PM
  • The idea is to get information displayed before selecting task sequence

    msg.vbs

    Wscript.Echo "Test MSG"

    Rules

    Priority=Default
    Properties=MyCustomProperty
    
    [Default]
    _SMSTSOrgName=xxx.com
    OSInstall=Y
    
    UserExit=msg.vbs
    
    SkipCapture=YES
    SkipAdminPassword=YES
    SkipBDDWelcome=YES
    SkipProductKey=YES
    SkipComputerBackup=YES
    SkipBitLocker=YES
    SkipUserData=YES
    SkipSummary=YES
    
    SkipComputerName=YES
    
    SkipDomainMembership=YES
    
    DeploymentType=NEWCOMPUTER
    
    SkipLocaleSelection=YES
    KeyboardLocale=0809:00000809
    UserLocale=en-GB
    UILanguage=en-GB
    
    SkipTimeZone=YES
    TimeZoneName=GMT Standard Time
    
    UserID=xx
    UserDomain=xx
    UserPassword=xx
    
    
    
    
    EventService=http://DINO-SRV-00:9800


    most of Skip__ are ignored by MDT

    • Edited by KarlisBr Thursday, October 23, 2014 2:55 PM
    Thursday, October 23, 2014 12:02 PM
  • I prefer BGInfo for the system info. It's simpler to manage and it stays there through all the wizard panes.

    Example here: http://scriptimus.wordpress.com/2011/07/04/mdt-2010-bginfo-in-winpe/

    /Andrew


    Blog: http://scriptimus.wordpress.com

    Thursday, October 23, 2014 7:48 PM
  • Thanks for advice, but in this case i'm looking to run custom vbs script.

    Any ideas why Rules are ignored?

    Friday, October 24, 2014 8:54 AM
  • If you remove the UserExit line, does the deployment work as expected?
    Friday, October 24, 2014 9:25 AM
  • yes

    Friday, October 24, 2014 10:31 AM
  • Well that's a start. At least we know that the UserExit script is causing the problem. If the UserExit script does not have a UserExit function returning Success, then it will cause the task sequence to fail. Your script does not have that function.

    The biggest problem with this question is that you do not understand what the UserExit script can do. It is not designed to display any information on the screen. If you want to display information on the screen, then you need to find another alternative, such as calling the script from the task sequence, or using BGInfo as Andrew suggested.

    UserExit cannot do what you want it to do (display information before choosing the task sequence).

    Friday, October 24, 2014 11:02 AM
  • Calling from task sequence will be processed after selecting task sequence . Is that right?

    Friday, October 24, 2014 12:04 PM
  • Good point, yes :) Ignore my suggestion.

    Looks like BGInfo might be your only choice.

    Friday, October 24, 2014 12:36 PM
  • You could make a new custom wizard pane that displays the information you need. This custom pane can be showed before the task sequence selection pane.
    • Edited by kniem Friday, October 24, 2014 1:24 PM
    Friday, October 24, 2014 1:23 PM