Difference between revisions of "User contributed software"

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search
(Generic Library for scripted checks)
(Generic Library for scripted checks)
Line 49: Line 49:
 
Mailing list discussion: http://lists.wpkg.org/swish.cgi?query=ideas+for+features&metaname=swishtitle
 
Mailing list discussion: http://lists.wpkg.org/swish.cgi?query=ideas+for+features&metaname=swishtitle
  
Info: A Component-based utility library to support external scripts.
+
Info: '''WPKG.Utility''', a COM-based utility library to support scripted 'Execute' checks.
  
Tired of writing scripts to support custom 'checks' in WPKG and then writing parameter parsers for each and every one of them?
+
Tired of writing scripts to support custom 'checks' in WPKG ?<br>
 +
Tired of writing parameter parsers for each and every one of them?<br>
  
This is a prototype script library based in a .WSC (Windows Scripting Component) file that can be included into your script files to simplify the process of designing custom checks.
+
This is a prototype script library based in a .wsc (Windows Scripting Component) file that aims to reduce your typing to the minimum.
  
It provides a skeletal framework to consolidate and collect useful functions for administrators. You can trim down your code and write your tests to a simple standard for re-usability and sharing with others.
+
It provides 2 resources;
  
The WSC file contains a rough-and-ready command-line parser and semi-automated parameter checks with options to debug code, trap errors 'in-the-field' and help build up a unified library of WPKG checks.
+
* A way to consolidate and collect useful functions for administrators.
 +
* A simple parser framework to develop reusable 'scriptlets'.
 +
 
 +
...and only takes one line in your scripts to implement!
  
It's a work in progress.
 
  
 
Features include;
 
Features include;
  
 
* Simple parsing of command-lines to validate custom parameters.
 
* Simple parsing of command-lines to validate custom parameters.
* A growing collection of inbuilt routines. (I'm adding things slowly!)
+
* A growing collection of built-in helper routines.
 
* A simplified approach for less experienced admins.
 
* A simplified approach for less experienced admins.
* All code is written in JScript to allow you to customise WPKG if you wish.
+
* All code is written in JScript to maintain compatibility with WPKG.js.
* Examples of 'less used' techniques.
+
* Illustrations of 'less used' techniques.
* ... being optimised as you read :-)
+
  
  
 
'''Documentation'''<br>
 
'''Documentation'''<br>
[http://dev.bus.brighton.ac.uk/kej/WPKG/Utilities/readme.txt readme.txt] - A rough summary of how to use WPKG.Utility.<br>
+
[http://dev.bus.brighton.ac.uk/kej/WPKG/Utilities/gettingstarted.txt gettingstarted.txt] - A quick guide to using WPKG.Utility.<br>
[http://dev.bus.brighton.ac.uk/kej/WPKG/Utilities/installing.txt installing.txt] - An quick guide to installation.<br>
+
[http://dev.bus.brighton.ac.uk/kej/WPKG/Utilities/integrating.txt integrating.txt] - A guide to using scriptlets with WPKG.<br>
[http://dev.bus.brighton.ac.uk/kej/WPKG/Utilities/WPKG.txt WPKG.txt] - A rough summary of how to use WPKG.Utility with WPKG.<br>
+
[http://dev.bus.brighton.ac.uk/kej/WPKG/Utilities/parser.txt parser.txt] - A rough guide to using the parser to make scriptlets.<br>
 +
[http://dev.bus.brighton.ac.uk/kej/WPKG/Utilities/advanced.txt advanced.txt] - A guide to more advanced techniques.<br>
 +
[http://dev.bus.brighton.ac.uk/kej/WPKG/Utilities/history.txt history.txt] - About the origins of WPKG.Utility.<br>
 
[http://dev.bus.brighton.ac.uk/kej/WPKG/Utilities/aboutWSC.txt aboutWSC.txt] - A rough guide to Windows Scripting Components.<br>
 
[http://dev.bus.brighton.ac.uk/kej/WPKG/Utilities/aboutWSC.txt aboutWSC.txt] - A rough guide to Windows Scripting Components.<br>
  
Line 84: Line 88:
  
  
'''Script Library'''<br>
+
'''Scriptlet Library'''<br>
  [http://dev.bus.brighton.ac.uk/kej/WPKG/Utilities/DiskTotalV100.js DiskTotalV100.js] - Checks a drive for a given total space.<br>
+
 
  Usage: [cscript.exe] DiskTotalV100.js <Drive|Path> <lessthan|lessthanorequalto|etc> <Megabytes><br>
+
Please note: These scripts need amendments made to them to locate the WPKG.Utility .wsc file.
 +
 
 +
  [http://dev.bus.brighton.ac.uk/kej/WPKG/Utilities/DiskTotalV101.js DiskTotalV101.js] - Checks a drive for a given total space.<br>
 +
  Usage: [cscript.exe] DiskTotalV101.js <Drive|Path> <lessthan|lessthanorequalto|etc> <Megabytes><br>
 +
Returns: 0, if the test succeeded, 1 if the test failed.<br>
  
  [http://dev.bus.brighton.ac.uk/kej/WPKG/Utilities/DiskFreeV100.js DiskFreeV100.js] -  Checks a drive for a given free space.<br>
+
  [http://dev.bus.brighton.ac.uk/kej/WPKG/Utilities/DiskFreeV101.js DiskFreeV101.js] -  Checks a drive for a given free space.<br>
  Usage: [cscript.exe]DiskFreeV100.js <Drive|Path> <lessthan|lessthanorequalto|etc> <Megabytes><br>
+
  Usage: [cscript.exe]DiskFreeV101.js <Drive|Path> <lessthan|lessthanorequalto|etc> <Megabytes><br>
 +
Returns: 0, if the test succeeded, 1 if the test failed.<br>
  
  [http://dev.bus.brighton.ac.uk/kej/WPKG/Utilities/DiskExistsV100.js DiskExistsV100.js] - Checks to see if a drive physically exists.<br>
+
  [http://dev.bus.brighton.ac.uk/kej/WPKG/Utilities/DiskExistsV101.js DiskExistsV101.js] - Checks to see if a drive physically exists.<br>
  Usage: [cscript.exe]DiskExistsV100.js <Drive|Path><br>
+
  Usage: [cscript.exe]DiskExistsV101.js <Drive|Path><br>
 +
Returns: 0, if the test succeeded, 1 if the test failed.<br>

Revision as of 14:30, 16 July 2008

InfoMessage

Info: Displays a simple, configurable, centered message box on the screen using HTML (IE5-IE7). See .js source header for more information.
Author: Brian White
URL: http://www.megaupload.com/?d=RQUSZPFS
Screenshots: Screenshot #1 | Screenshot #2
Mailing list discussion:


wpkgmessage

Info: Shows little window which can be used to tell the user what WPKG does at the moment.
Author: grubi
URL: ftp://ftp.gig-mbh.de/software/wpkgMessage.zip
Mailing list discussion:


"Ugly perl script to check if packages are installed on a set of workstations"

Info: When you run the script, it will evaluate the list of packages that should be installed with the packages that are installed on each computer in the status directory. It then prints the differences. If the program gives no output, then everything is up to date. I use this program to send a list to our desktop techs about which computer are out of compliance.

Author: Chris Crow
Script source: http://lists.wpkg.org/pipermail/wpkg-users/2008-March/002820.html
Mailing list discussion:


Scripts for generating hosts.xml from Active Directory

Info: Scripts written in different languages (Perl, bash, vbScript) which pull hosts.xml from Active Directory OUs automatically
URL: http://wpkg.org/WPKG_with_Active_Directory


Script for checking if a process is already running

Info: Sometimes, you don't want to make an upgrade or installation if a user has already started a given process, because:

  • upgrade could fail, as the files are in use,
  • if the installer is "smart", it could kill the running process, without asking the user to save (precious) work,
  • some software (like certain browser plugins) won't install if some other software is running (i.e., a browser).

URL: http://wpkg.org/Script_for_checking_if_a_process_is_already_running

Generic Library for scripted checks

Author: Keith Jones
Mailing list discussion: http://lists.wpkg.org/swish.cgi?query=ideas+for+features&metaname=swishtitle

Info: WPKG.Utility, a COM-based utility library to support scripted 'Execute' checks.

Tired of writing scripts to support custom 'checks' in WPKG ?
Tired of writing parameter parsers for each and every one of them?

This is a prototype script library based in a .wsc (Windows Scripting Component) file that aims to reduce your typing to the minimum.

It provides 2 resources;

  • A way to consolidate and collect useful functions for administrators.
  • A simple parser framework to develop reusable 'scriptlets'.

...and only takes one line in your scripts to implement!


Features include;

  • Simple parsing of command-lines to validate custom parameters.
  • A growing collection of built-in helper routines.
  • A simplified approach for less experienced admins.
  • All code is written in JScript to maintain compatibility with WPKG.js.
  • Illustrations of 'less used' techniques.


Documentation
gettingstarted.txt - A quick guide to using WPKG.Utility.
integrating.txt - A guide to using scriptlets with WPKG.
parser.txt - A rough guide to using the parser to make scriptlets.
advanced.txt - A guide to more advanced techniques.
history.txt - About the origins of WPKG.Utility.
aboutWSC.txt - A rough guide to Windows Scripting Components.

Code
Utility-V110.wsc - The WPKG.Utility component library.

Examples
DiskSpace.js - A documented version of the DiskTotal.js. script


Scriptlet Library

Please note: These scripts need amendments made to them to locate the WPKG.Utility .wsc file.

DiskTotalV101.js - Checks a drive for a given total space.
Usage: [cscript.exe] DiskTotalV101.js <Drive|Path> <lessthan|lessthanorequalto|etc> <Megabytes>
Returns: 0, if the test succeeded, 1 if the test failed.
DiskFreeV101.js -  Checks a drive for a given free space.
Usage: [cscript.exe]DiskFreeV101.js <Drive|Path> <lessthan|lessthanorequalto|etc> <Megabytes>
Returns: 0, if the test succeeded, 1 if the test failed.
DiskExistsV101.js - Checks to see if a drive physically exists.
Usage: [cscript.exe]DiskExistsV101.js <Drive|Path>
Returns: 0, if the test succeeded, 1 if the test failed.