![]() |
Computer Creations
Software Providing turn-key solutions and custom DLL's. For more information please Contact me |
CCSBatch v1.2 (c) 2008
CCSBatch - Copyright 2008 (c) Computer Creations Software
What is it? - an executable that will complete commands
as a batch file would, except faster and 32 bit.
CCSBatch is an executable to run in place of batch files, on machines where
perhaps batch files are not allowed or security is very tight.
The path to the executable is the path of installation, or copy it into a path'd
directory if you choose.
----------------------------------------------------------------------------------------
Revision History
1.2 - 7/19/2008 Added MSGBOX and BEEP capability, added Variable ability for
user defined variables, Changed "General" to "Commands".
Also chose a 10 command release for freeware/evaluation. Enterprise level
available soon for 100 commands. Passwords are 128 bit RC4 encrypted.
Batch Administration tool added - easy to create INI files!!
1.0 - 7/5/2008 Initial Release
----------------------------------------------------------------------------------------
CCSBatch is an executable to run in place of batch files, on machines where
perhaps batch files are not allowed or security is very tight.
The path to the executable is the path of installation, or copy it into a path'd
directory if you choose.
While this application is installed - it does zero registry entries and can be
moved to a path/folder of your choice.
There are currently 13 commands available to run.
You may enter a commandline of a properly configured INI file and the
application will read that INI file.
The commandline is the INI file you wish to run.
eg. c:\CCSBatch\CCSBatch.exe DatabaseBackup.ini
IF NO COMMANDLINE IS SPECIFIED: CCSBatch will look for "CCSBatch.ini" in the
folder CCSBatch.exe resides (Does not have to be the install folder)
Modifying the INI file:
The batch administration tool will do all of this for you, this tool ONLY
creates the INI files that CCSBatch.exe will use to perform routines.

Definitions:
Variables - key words that can replace phrases when used repetitively. Or, in
the case of using an encrypted password.
Encryption key is generated from random space noise, there are over 1000 keys
available - while not entirely secure (Because key is stored)- it will keep out
kiddie script hackers.
The encryption algorithm is RC4 using a 128bit key.
Options CCSBatch.exe can use:
Do not prompt to create directory during COPY - using my example above,
if G:\Backups did not exist, CCSBatch would
simply create it prior to copying files.
Do not prompt to delete or overwrite - This is
for overwriting existing files without having to continuously press "Yes to
all".
Great for unattended backups and file copy!
Do not show file copy progress dialog - This is the dialog box Windows
will display (Based on the API call I use) - visible or not..
Do not copy file security attributes - This will cause files copied to use the inherited file permissions.
Stop processing batch commands on error - Tells CCSBatch to stop if there is an error - This may not apply to file copy.
Enable Event Logging - CCSBatch can keep a log file of commands it ran - great when troubleshooting back-ups etc is necessary.
Set Window TopMost/System Modal - CCSBatch will display on the screen above all other applications (Invisible window coming soon)
Shell Window display options - Tells how to show
or not show a SHELL'd window - ie if you run a separate program from the SHELL
command, it can be visible/invisible etc
0 Hide window
1 Normal with focus (default)
2 Minimized with focus
3 Maximized with focus
4 Normal without focus
6 Minimized without focus
-------------<manual editing>----------------
In general the parameters are separated by the | symbol (pipe symbol) or there
is no second parameter.
This is easier to parse on than a space when there may be spaces in the
filenames provided.
For demonstration purposes the readme will assume the following:
COMMAND Param1|Param2
Commands available and options, Examples are provided below
HIGHLY RECOMMEND that you use full paths when executing commands.
BEEP plays the default Windows waveform sound, typically a 1/4 second tone,
through either the built-in speaker; or a sound card if installed (in which case
the Windows "Default Beep" sound is played).
CHDIR - Change working directory
COPY - Copies File or folder to destination
DELETE - Delete file(s) or folders. This WILL accept wildcards - be careful.
ENVIRON - SET an environmental variable - only good within the confines of this
program and will erase when the program ends.
MKDIR/RMDIR - Exactly like the Dos command to make or erase a directory -
directory must be empty and you must have rights prior to deleting.
MOVE - Param1|Param2 - move a file or folder to another directory
MSGBOX - Provides a system modal message box to display information to a user,
such as a reboot etc. Application pauses while waiting user response.
REM - Ignored - use for your comments only
RENAME - Rename a file or folder
SLEEP - Pause the application - Parameter is in milliseconds so 5000 would pause
the program for 5 seconds.
SHELL - Run another program, this application will suspend while the SHELLed
program is running.
SERVICE START <ServiceName> - start a service
SERVICE STOP <ServiceName> - stop a service
OPTIONS -
NoCopySecurityAttributes - When set to 1 the security attributes will inherit
from the folder they are copied or moved into.
NoPromptCreateDir - When set to 1 the application will not prompt you to create
a folder if it does not exist, it will be created automatically
NoPromptDelete - When set to 1 there will be no prompt to delete files - they
will be deleted automatically
ShellWindow - How the window will look when a SHELLed application is launched:
0 Hide window
1 Normal with focus (default)
2 Minimized with focus
3 Maximized with focus
4 Normal without focus
6 Minimized without focus
SilentCopy - When set to 1 no progress dialog boxes will display, only the main
application window.
StopOnError - in the event a command is mistyped the application will stop
running.
Key=4F2E5041552C3B3B2D582430265D3655 - This key was generated using the password
encryption tool provided, it must be present if the %PW% variable is to be used.
VARIABLES-
Where a variable is displayed and read in the INI file under Variables, it will
be swapped out with all other %variables% located in your code.
For example, an Oracle SID %ORACLE_SID%|MYDATABASE Where MYDATABASE WOULD BE
SWAPPED OUT IN ANY LINE OF CODE in the Commands section.
This saves modifying/global search and replace for multiple uses of one ini
file.
This is a growing/expanding feature - user input welcome!
Sample CCSBatch.INI
[Variables]
Variable1=%PW%|64797C4DE1BEF354AE
[Commands]
Command1=COPY D:\mp3\2000's Music\Goo Goo Dolls\Dizzy Up The Girl|\\BACKUPSERVER\D$\Backup\MP3's\2000's
Music\Goo Goo Dolls
Command2=RENAME E:\Database|E:\OldDatabase
Command3=DELETE D:\TEMP\*.TMP
Command4=ENVIRON ORACLE_SID=MYORACLESID
Command5=CHDIR D:\MP3
Command6=REM Next we will create and remove a directory
Command7=MKDIR D:\Test
Command8=RMDIR D:\Test
Command9=SLEEP 5000
Command10=MOVE D:\DATABASE\OLDFILES|D:\BACKUPDATABASE\OLDFILES
Command11=SHELL C:\WINDOWS\system32\cmd.exe /C DIR *.* > filename.txt
Command12=SERVICE START Telephony
Command13=SERVICE STOP Telephony
Command14=MSGBOX "Exiting application"
[Options]
NoPromptCreateDir=1
NoPromptDelete=1
SilentCopy=0
NoCopySecurityAttributes=1
ShellWindow=1
StopOnError=1
Key=4F2E5041552C3B3B2D582430265D3655
---------------------------------------------------------------------------------
Computer Creations Software