new to batch scripting help

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
gomboc
Posts: 2
Joined: 07 Jan 2014 13:16

new to batch scripting help

#1 Post by gomboc » 11 Mar 2014 08:21

Need general guidance on getting started with scripting. It's easier for me to see it first rather then reading a book :mrgreen:



This is what I have thus far
@ECHO OFF & CLS
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
TITLE Installation of Caterpillar-Gas Engine Rating Pro-v4.0
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Purpose: Caterpillar-Gas Engine Rating Pro-v4.0
:: Version: 1.2
:: Author: Norbert Saska
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: Set script parent directory:
SET _ScriptDir=%~dp0
SET _ScriptDir=%_ScriptDir:~0,-1%

:: Run OS architecture check:
IF DEFINED PROGRAMFILES(X86) (
SET _OSArch=x64
) ELSE (
SET _OSArch=x86
)

:: Display status message:
ECHO.
ECHO Installing GERP...

:: Run commands:
START "Install" /WAIT "%_ScriptDir%\SRC\pd_core_160.exe" /QUIET /NORESTART

:: Display return code and set exit code:
ECHO. & ECHO Return Code: %ERRORLEVEL% & SET "_EXITCODE=%ERRORLEVEL%"

:: Display completion notice:
ECHO.
ECHO Done!

:: Delay for processing:
PING 127.0.0.1 -n 3 > NUL

:: Pause to view results:
:: ECHO.
:: PAUSE
EXIT %_EXITCODE%

Squashman
Expert
Posts: 4488
Joined: 23 Dec 2011 13:59

Re: new to batch scripting help

#2 Post by Squashman » 11 Mar 2014 09:45

What is your question?

gomboc
Posts: 2
Joined: 07 Jan 2014 13:16

Re: new to batch scripting help

#3 Post by gomboc » 11 Mar 2014 11:06

the script I created launches the setup.exe but the users still have to keep clicking on the next buttons etc.. how do I make this to be a complete install where users do not have to click on any buttons after the initial wizard opens.

Squashman
Expert
Posts: 4488
Joined: 23 Dec 2011 13:59

Re: new to batch scripting help

#4 Post by Squashman » 11 Mar 2014 12:09

If the setup program does not have any silent install options you would have to script the mouse clicks or keyboard keys with a program like AutoHotkey or AutoIt.
That is out of the scope of this forum. I believe they both have their own support forum.
http://www.autohotkey.com/board/

Post Reply