The makers of ScriptLogic and Desktop Authority have provided the Scripting Toolkit freeware to enhance your batch scripts.

NOTE: In the Windows & .NET magazine's 2003 readers' choice awards, ScriptLogic won Best Software, 2 bests in the System Management catagory, and a best in the Utilities catagory.

The Scripting_Toolkit.htm file contains:

Copyright (C)2003 ScriptLogic Corporation

The Scripting Toolkit is a collection of several Win32 utilities that we've created to make scripting a bit easier. While our flagship product, ScriptLogic, offers the functionality of these tools natively, we realize that ScriptLogic is not right for every situation.

Whether you're writing your own logon scripts, or you're simply creating automation scripts for use outside the logon process, we hope you find the utilities contained in the Scripting Toolkit extremely helpful.

There are currently nine utilities contained in the toolkit:

CancelBt Enable or disable the Cancel button on any dialog at will.
 
ClrName Erases the last user's name from the Windows 95 logon dialog box.
 
HideExec Conceals the screen output of any application (Windows or console-based).
 
MakeScut Creates Windows Shortcuts (.lnk/.pif/.url).
 
MMD Creates a multi-level \[sub\]directory structure.
 
NetOrder NetOrder allows you to switch the network provider call order in Windows 9x. A necessity if you have a mixed Microsoft/Novell environment and are using Novell's Client32.
 
PlayWav Plays any WAV file (asynchronously).
 
StartBt Temporarily hides, shows or permanently removes (for the current session) the the Start button from the Taskbar.
 
xDel Tool to delete all files in a folder (and optionally recurse subfolders like the old DOS utility, DelTree).
 

If you like these little utilities, you'll love ScriptLogic! Be sure to stop by and read about all the amazing features found in our flagship product at http://www.scriptlogic.com.

 


CancelBt

CancelBt is used to enable or disable the Cancel button on the active Window.

Purpose

This can be extremely useful when performing automated software deployments. Many software packages, even when instructed to use the /Quiet mode, after display a progress dialog with a Cancel button. Unfortunately, users have been know to repeatedly press this button for no apparent reason.

By disabling the cancel button while the automated software deployment is taking place, the user is unable to abort the process.

Syntax

CancelBt \[/enable\] \[/disable\]

/enable

Loaded the CancelBt application into memory. While in memory, the cancel button of the top-most window will be hidden.
 

/disable

Unload the CancelBt application from memory.
 

Note: This component is still under development.


ClrName

 

Use this 32-bit utility to clear the last user's name from the Windows 95 logon dialog box. 

Purpose

  1. To increase network security: The default of displaying the user's name that last logged on leaves the potential hacker with only having to guess the last user's password, rather than both their name and password.

  2. To reduce network administration: As a network administrator, how many times have you taken a call from a user like this? "I can't logon today. The system keeps telling me my password is invalid." Then, after checking the network account's lockout status, you realize that while the user is typing the correct password, someone else's name is in the username box. Perhaps this was another user or maybe it was you doing some late night work on their PC. Need I say more?

Of course, with all platforms after Windows 95 (including 98, Me, NT4, 2000 and XP), automatically clearing the last username from the logon dialog box is a simple registry change, and is often performed through policies. Unfortunately, this functionality was never included with the Microsoft Windows 95 operating system.

Simply copy the executable, or place a shortcut to the executable, in your Windows startup folder. Alternatively, you could utilize the HKCU\Software\Microsoft\Windows\CurrentVersion\Run or RunOnce registry keys or include ClrName.exe as the last line in your login/logon script.

If you use ClrName with Windows NT 4.0, Windows 2000 or Windows XP, the user logging on must be an administrator of the local machine (or otherwise have access to write the necessary values to the registry).

Syntax

ClrName xx

xx is an optional command line parameter used to indicate the number of seconds to wait before clearing the last username. The default delay if 15 seconds if no specific delay is specified on the command line. The delay is used so that if you call ClrName from your login/Logon script, the script has enough time to finish execution before the Window 9x logon completes and the shell (Explorer) is loaded. 

Example:

ClrName 60

wait 60 seconds before clearing the last username.

 


HideExec

 

HideExec is a 32-bit command-line utility used to conceal the screen output of any program. 

Purpose

This can be especially useful in scripting languages and/or logon scripts, when console-based applications are needed, but where their screen output isn't desired.

Syntax

HideExec program

Simply prepend your normal command line with the HideExec utility.

Example:

If you would normally execute the following command line during your network logon process:

NET TIME \\SERVER /SET /YES

You could conceal the screen output and the console window that might be create by using HideExec as follows: 

HIDEEXEC NET TIME \\SERVER /SET /YES

Note: If the application executed by HideExec does not terminate on its own, it will remain in memory until the user that executed it logs off. Always test your applications thoroughly before wrapping them in HideExec.

Example code that can be used in a KiXtart script:

<font face="Courier New" size="2" color="#333333">$TimeServer="\\MyServer"
$CmdLine="NET TIME "+$TimeServer+" /set /yes"
$HideCmdLine=@LServer+"\HideExec.exe "+$CmdLine
?'This is what a normal time synchronization console window would look like'
get $anykey
Shell $CmdLine
?'...And this is what you won't see when its output is concealed...'
get $anykey
Shell $HideCmdLine
?'Done!'</font>

MakeScut

Use this 32-bit command-line utility used to dynamically create shortcuts on the Windows 95/98/Me/NT/2000/XP operating system.

Purpose

MakeScut can create shortcuts in any folder on the client, including the Desktop, Start Menu, Program Menu, IE Quick Launch Bar, etc. The MakeScut utility is used by ScriptLogic to create the Shortcuts defined on the Shortcuts tab in the ScriptLogic Manager. You can also get creative by using the MakeScut utility within ScriptLogic custom scripting.

Syntax

MakeScut /n "xxx" /t "xxx" \[/i "xxx"\] \[/a "xxx"\] \[/s\] \[/r\] \[/o\] \[/k\] \[/c "xxx"\]  

 

/n Name of the shortcut to be created, including the full path.
 
  /t Target application that the shortcut will be used to launch, including full path.
 
  /i Filespec (and optionally an index) of the icon for the shortcut, including full path.
 
  /a Arguments used by the target application.
 
  /s Start in (a.k.a. Working directory), including full path.
 
  /r Run window. Default is a normal window. Options include min or max.
 
  /o Overwrite. If the /o switch is not specified, the default behavior is do not overwrite.
 
  /k Shortcut Key used to launch the application. 
 
  /c Comment (displayed on mouse hover). 
 

Notes:  

  • The name (/n) and target (/t) parameters are required. All other parameters are optional. 
  • Surround the /n, /t, /i, /a and /c parameters with "double quotes" if the parameters contain spaces, slashes, etc.
  • MakeScut will default to the current folder if no full path is specified for any parameters including /n, /t, /i and /s.
  • MakeScut will automatically create the appropriate type of shortcut (.lnk, .pif or .url) based on the type of target application.

Example code that can be used in a KiXtart script:

<font color="#333333" size="2" face="Courier New">$ShellDesk=Readvalue('HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders', 'Desktop')
$OSclass='@inwin'
if $OSclass='1' ; NT
  $TargetPath='%windir%\System32'
else ; 9X
  $TargetPath='%windir%'
endif
$TargetFilespec=$TargetPath+'\calc.exe'
$cmdline = @Ldrive + '\MakeScut.exe /n "$ShellDesk\Calculator" /t "$TargetFilespec" /r min /o /k CTRL+ALT+C'
Shell $cmdline</font>

MMD

 

MMD is used to create directories (folders). MMD allows folders to be created more than 1 level deep.

Purpose

This function is useful within your scripts to create folders/subfolders.

Syntax

MMD \[drive:\]path

drive:

Specify the drive letter on which the folder(s) will be created.
 

path

Enter the path of the folder(s) to be created.
 

Examples:

MMD H:\Documents

will create a Documents folder on drive H:

MMD H:\Data\Excel

will create a Data folder, if it does not exist as well as an Excel subfolder.

 


NetOrder

 

NetOrder is used to change the network client call order used when logging on to the network.

Purpose

Use to change the network call order as well as query the state of the current call order from the registry. It is designed so that you could change the network call order of your 9x clients, centrally - VIA your existing NetWare logon script. Useful if you're migrating to NT/2000 with the help of ScriptLogic, doing it yourself with KiXtart and/or batch files, or even if you're just running a heterogeneous (NT/NW) network. 

Syntax

NetOrder \[/query\] \[/<First Provider> /<Second Provider>\]

/query    

Use to query the network call order of either Microsoft or Novell. Specify /M for Microsoft or /N for Novell.
 

/First Provider

Specify /M (Microsoft) or /N (Novell) to make it the first provider in the network call order. 
 

/Second Provider

Specify /M (Microsoft) or /N (Novell) to make it the second provider in the network call order.
 

Examples:

NetOrder /query    

Queries the registry for the current network call order.

NetOrder /M /N

Makes the current network call order first Microsoft and then Novell.


PlayWav

 

Playwave is used to execute a .wav sound file.

Purpose

Use to play a wav file from within a .BAT file or logon script. 

Syntax

Playwav wavfile\[.wav\]

wavefile Specify the .wav filename. Optionally specify the .wav filename extension.

    

Example:

Playwav ding.wav

Plays the specified .wav file.


StartBt

 

StartBt is used to hide, show or disable the Taskbar's Start button.

Purpose

Prohibiting the user from gaining access to the Start Menu is one of the few lock-down steps that cannot be performed by policies.

Syntax

StartBt \[/hide\] \[/show\] \[/remove\]

/hide hides the Start button.
 
/show shows (un-hides) the Start button.
 
/remove removes the start button for the remainder of the user's session. Once removed, the /show argument has no effect. The only way to get the Start button back after removing it is to restart Explorer.
 

xDel

 

XDel is used to delete the contents of a directory.

Purpose

Use from within a .BAT file or script to delete the contents of a directory. The directory itself may optionally be deleted.

Syntax

xDel /d source \[/deltree\] \[delbase\]

source Directory to delete from.
 
/deltree Recurse subdirectories.
 
/delbase Delete the source directory.
 

    Examples:

xDel /d %TEMP% /deltree

Deletes all files from the %TEMP% directory including all subdirectories

xDel /d X:\JunkFiles /deltree /delbase

Deletes all files from X:\JunkFiles including all subdirectories. The JunkFiles directory is also deleted.