Announcement

Collapse
No announcement yet.

need some help with .wsf script

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • need some help with .wsf script

    Hi,
    when executing the .wsf script below it popups a window that requires to click OK to continue...
    What will be appropriate way to suppress the notif and just go to execute... Please provide the right modif...

    Const WelcomeMessage1 = "You have inserted a Windows Deployment Disk/Drive."
    Const WelcomeMessage2 = "Press OK to continue with this installation, otherwise Cancel."


    Need it for tomorrow, cannot test it now. but may be some command should be entered (scripting is touchy especially with a lack of knowledge in the topic ).

    Thx.

    __________________________________________________ ________

    Code:
    <job id="BDD_autorun">
    <script language="VBScript">
    
    ' // ************************************************** *************************
    ' //
    ' // Copyright (c) Microsoft Corporation. All rights reserved.
    ' //
    ' // Microsoft Deployment Toolkit Solution Accelerator
    ' //
    ' // File: BDD_autorun.xml
    ' //
    ' // Version: 6.2.5019.0
    ' //
    ' // Purpose: Simple dialog for MDT Autorun
    ' //
    ' // Usage: Only called from autorun.inf on removable media
    ' //
    ' // ************************************************** *************************
    
    Option Explicit
    
    
    '//----------------------------------------------------------------------------
    '// Global Constants
    '//----------------------------------------------------------------------------
    
    Const WelcomeMessage1 = "You have inserted a Windows Deployment Disk/Drive."
    Const WelcomeMessage2 = "Press OK to continue with this installation, otherwise Cancel."
    Const WelcomeHeader1 = "Auto-Run Windows Deployment"
    
    '//----------------------------------------------------------------------------
    '// Main
    '//----------------------------------------------------------------------------
    
    Dim oShell
    
    '
    ' Get Confirmation
    '
    
    Set oShell = CreateObject("WScript.Shell")
    
    If oShell.Popup( WelcomeMessage1 & vbNewLine & WelcomeMessage2, 15, WelcomeHeader1, 1 or 64) = 1 then
    
    oShell.Run "cscript.exe //nologo """ & WScript.ScriptFullName & "\..\LiteTouch.vbs""",,FALSE
    
    End if
    
    
    </script>
    </job>
    Last edited by biggles77; 1st September 2017, 13:58.
    "When you hit a wrong note it's the next note that makes it good or bad". Miles Davis

  • #2
    the solution was simple, suggested by my colleague...

    this script finally calls the script on the last line: oShell.Run "cscript.exe //nologo """ & WScript.ScriptFullName & "\..\LiteTouch.vbs""",,FALSE

    and it is LiteTouch.vbs

    that is... we bypass all messages and go straight to the script for the task

    "When you hit a wrong note it's the next note that makes it good or bad". Miles Davis

    Comment


    • #3
      Nice job mla. Well done!
      1 1 was a racehorse.
      2 2 was 1 2.
      1 1 1 1 race 1 day,
      2 2 1 1 2

      Comment

      Working...
      X