Winscripter
  WSH
  Forums
  Downloads
  Books
  Links
  Amazon




Login
Register

© winscripter.com
1998-2004







Script: Find the Path of Winzip

Posted by on Monday, January 19, 2004 (PST)

Script: Determines the path of Winzip on a system by reading the registry. Example of using WSH to read the registry.

 

 
/** 
 *    Script:   findZip.js
 *    Purpose:  Finds the path of WinZip if present on your system.
 *    Author:   Daren Thiel (converted to js from newsgroup post).
 *    Date:     16 May 1999
 *    Web:     
http://www.winscripter.com
 *    Note:     Rename this script findZip.js
 *
 *              Copyright 1999 Daren Thiel
 **/
// Create a shell object
var ws = new ActiveXObject( "WScript.Shell" );
// Store the registry key we are looking for in a variable.
// You can also plug this value directly into regRead()
var key = "HKCR\\WinZip\\shell\\open\\command\\";
// Find the value stored for this key.
// If you get an error here you probably don't have WinZip.
var zip = ws.regRead( key );
// The key is store with a '%1' at the end.  We should
// strip this off to get the path to winzip.
var zip = zip.substring( 0, zip.indexOf( " " ) );
// Tell them what you found.
WScript.Echo( zip );
 

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