none
Launching LiteTouch.vbs via batch file

    Question

  • Hello,

    I was wondering if there's a way to LiteTouch.vbs via  file, having the credentials and domain pop-up post prior to the device rebooting and going into WinPE when doing a PC refresh. 

    I am using this as my batch file: 
    start \\MyServer\MyLocation\Deployments\Current\Scripts\litetouch /user:username password

    When I run this file (I am RDP'ed to the PC that I run the batch file from) it does start the bootstrap and starts off at where you name the PC, then pick the tasksequence and then it kicks off the initial refresh by rebooting the PC. WinPE then comes up and prompts me for credentials to continue with the image/refresh. Once I input working credentials, the rest of the LiteTouch process continues.

    What I would like is that prompt screen to input creds to come up with I am on the device that I ran the batch file from prior to rebooting so I do not have to enter them at the PC.

    I have seen this done in the past at my previous employeer but I was not a part of the WDS / MDT (actually they used SCCM) team and never took the time to look at the .bat file they had setup for us to use. Everything that I have  with WDS and MDT at this company in the past year has been self-taught so I do apologize if this is a simple task.  


    • Edited by TheUsD Tuesday, January 3, 2017 6:21 PM
    Tuesday, January 3, 2017 6:16 PM

Answers

  • YOu need to pass the credentials for the network account as variables that MDT can understand.

    /USer:UserName Password

    is not something that MDT will understand.

    Additionally, Generally it's best to start MDT in a refresh scenario using Litetouch.vbs, however it's just a wrapper around Litetouch.wsf, if you are having problems passing arguments, try calling Litetouch.wsf directly.

    cscript.exe \\server\deploymentshare$\scripts\Litetouch.wsf /TaskSequenceID:MyTS /UserID:LAbAdmin /UserDomain:Contoso /UserPassword:P@ssw0rd /SkipWizard:Yes [etc...]


    Keith Garner - Principal Consultant [owner] - http://DeploymentLive.com

    Friday, January 6, 2017 2:21 AM
    Moderator

All replies

  • If I understand you correctly, your batch file could be like this:

    @echo off
    
    REM ------------------------------------------------
    REM | ONLY use this from within Windows, NOT WinPE |
    REM ------------------------------------------------
    
    echo.
    echo.
    echo ****  Microsoft Deployment Toolkit  ****
    echo.
    echo You MUST be logged on as Administrator.
    echo You MUST use "Run as Administrator" when using this batch file.
    echo.
    echo.
    echo.
    REM Mapping to Deployment server to access files and scripts.
    echo Connecting to Deployment Share
    NET USE M: \\SERVER\SHARE
    echo.
    cscript M:\Scripts\LiteTouch.vbs

    When prompted for a username and password, use the credentials that have access to the network share.


    If this post is helpful please vote it as Helpful or click Mark for answer.

    Tuesday, January 3, 2017 10:03 PM
  • Thank you for the very quick response.

    I did what you said and it gave me the exact same results as the bat file I had created. I did not get a username and password prompt with either.

    Tuesday, January 3, 2017 10:17 PM
  • When you attempt to map a drive letter to a network share Windows will prompt for credentials, unless the currently logged in user has access rights to the share.

    You said you RDP to the machine. Are you logged in with the local Administrator account? MDT won't work unless you run it from Administrator. It will not work even if you use another account with admin privileges.


    If this post is helpful please vote it as Helpful or click Mark for answer.

    Tuesday, January 3, 2017 10:28 PM
  • When I RDP, I am RDP'ing with Domain and Enterprise Admin level credentials. I right clicked the bat file you provided and ran as administrator. The network drive mapped and the liteTouch.VBS script runs as intended. However, there was at no point where I was prompted for any credentials by LiteTouch or MDT.

    • Edited by TheUsD Wednesday, January 4, 2017 2:05 PM
    Tuesday, January 3, 2017 11:49 PM
  • You must run MDT as the machine's local administrator. If you are not prompted for credentials, but it maps the drive letter anyway, that's because the account you are logged in with already has rights to access the deployment share.

    If this post is helpful please vote it as Helpful or click Mark for answer.

    Wednesday, January 4, 2017 2:39 PM
  • Is this specific to MDT and not SCCM?

    I know when I worked at my previous company, we did not RDP to a device as a local admin.

    Wednesday, January 4, 2017 7:11 PM
  • YOu need to pass the credentials for the network account as variables that MDT can understand.

    /USer:UserName Password

    is not something that MDT will understand.

    Additionally, Generally it's best to start MDT in a refresh scenario using Litetouch.vbs, however it's just a wrapper around Litetouch.wsf, if you are having problems passing arguments, try calling Litetouch.wsf directly.

    cscript.exe \\server\deploymentshare$\scripts\Litetouch.wsf /TaskSequenceID:MyTS /UserID:LAbAdmin /UserDomain:Contoso /UserPassword:P@ssw0rd /SkipWizard:Yes [etc...]


    Keith Garner - Principal Consultant [owner] - http://DeploymentLive.com

    Friday, January 6, 2017 2:21 AM
    Moderator
  • Thank you.

    I will try this tomorrow and report back my findings.

    Friday, January 6, 2017 2:38 AM
  • Hello Keith, 

    I did what you mentioned.  It does select the task sequence automatically but it does not run it.  I am attaching a screenshot.  Wondering how i can get it running automatically as well. 

    Thanks for your help.


    Ishan

    Monday, August 13, 2018 4:58 AM
  • I think I found my issue. I was not passing the flag /SkipTaskSequence:YES

    So my final command was \\SERVERNAME\....deploymentshare$\scripts\litetouch.vbs /TaskSequenceID:XXXX /SkipTaskSequence:YES

    Thanks for this thread.  It still helped me with the correct answer.


    Ishan

    Monday, August 13, 2018 5:19 AM