Winscripter
  WSH
  Forums
  Downloads
  Books
  Links
  Amazon




Login
Register

© winscripter.com
1998-2004







Display a Popup Message

Posted by on Saturday, January 17, 2004 (PST)

Use WSH to show a popup message

/**
 *    Name:           wshpopup.js
 *    Description:    Simple script to show a WSH Popup Message Box.
 *    Author:         Daren Thiel
 *    Date:           31 Oct 1998
 *    Web:           
http://www.winscripter.com
 **/
/* Function to encapsulate a Popup */
function showit()
{
  var Message = "This is my first popup";
  var timeout = 0;
  var title   = "This is the title";
  var buttons = 65;
  var rslt;
  var WS = WScript.CreateObject("WScript.Shell");
  rslt = WS.Popup(Message, timeout, title, buttons);
  if ( rslt == 2 ) {
   WScript.Quit;
  } 
}

/* Call the function */
showit();

 
 


 


Add Your Comment



WSH and ADSI Administrative Scripting

New Articles
  • List installed COM objects and associated ProgIDs
    Script: Lists all COM Objects and their associated ProgIDs (If available). Win32_ClassicCOMClassSetting

  • Script: File Rotator
    Script: Rotate files where the most current file has the lowest number in the archive. When files exceed the retention period, they are deleted. Typically used for log files, backups, etc..

  • Script: Create IIS Website and DNS record
    Script: Dan Casier sent me this script that will create a website and appropriate DNS record. The script is intended for Windows 2000 Server with local DNS and necessary DNS mof installed.


  • Winscripter   |  WSH   |  Forums   |  Downloads   |  Books   |  Links   |  Amazon