none
need some help with .wsf script RRS feed

  • Question

  • 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.

    __________________________________________________ ________

    <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>

    --- When you hit a wrong note its the next note that makes it good or bad. --- Miles Davis

    • Moved by Bill_Stewart Tuesday, November 7, 2017 9:08 PM This is not "fix/debug/rewrite gallery script for me" forum
    Wednesday, August 30, 2017 11:38 PM

All replies

  • Just delete the line that shows the message.

    Note that we do not fix odd scripts.  This is not a user support forum. You can ask the author for help.


    \_(ツ)_/

    Wednesday, August 30, 2017 11:51 PM
  • Sorry :)

    I believe you know the author very very well...

    Guess..

    It is MSFT.

    And nothing odd here...

    Will try and definitely will mark as answer if it will do the trick...

    THANKS.


    --- When you hit a wrong note its the next note that makes it good or bad. --- Miles Davis



    • Edited by pob579 Thursday, August 31, 2017 12:21 AM
    Thursday, August 31, 2017 12:05 AM
  • Just know that this forum is not a Microsoft support forum.  For help with MS utilities contact MS support or read the documentation.

    Of course you can just delete the line.

    Start by typing wscript /?


    \_(ツ)_/

    Thursday, August 31, 2017 1:32 AM
  • of course just deleting the line didn't work...

    what did work was using directly the script mentioned in the last line:

    oShell.Run "cscript.exe //nologo """ & WScript.ScriptFullName & "\..\LiteTouch.vbs""",,FALSE

    and of course it is VBS that is called by the script I asked for "a little help of my friends " (advanced programmers on MS forum)

    using directly: cscript LiteTouch.vbs perfectly solved the issue with notification messages as "odd" script just calls this one.

    Just for info...


    --- When you hit a wrong note its the next note that makes it good or bad. --- Miles Davis

    Sunday, September 3, 2017 10:08 PM
  • Good.  Unfortunately this forum is not a free script finding service.  You issue appears to be related to how you have configured your scriptin.  To suppress popups that are caused by WScript.Echo requires using the correct script engine.  The "WScript /?" telss you how to configure the script engine.  Of course you didn't read it and poked around until someone gave you an answer that you didn't have to think about.  That is why we don't answer questions like this.  They are related to learning basic Windows and have nothing to do with how todo something in a script that you have written.

    If you have a question about a script you have written then post back and we will try yo help you.


    \_(ツ)_/

    Sunday, September 3, 2017 10:39 PM
  • thanks

    --- When you hit a wrong note its the next note that makes it good or bad. --- Miles Davis

    Monday, September 4, 2017 12:32 PM