• 0

Installation Script


Question

Hello All,

I am after a little bit of help, i am trying to write a script that will call an installation exe then once it has completed i can enter a username and the script will copy over the configuration files required.

Here is the code i am using;

@echo off
echo.
echo *********************************************************
echo * Scan Snap Scanner Installation Script *
echo * Installs scanner software and Config *
echo *********************************************************
echo.

"\\rjah\dfs\Drivers\Scanners\Scansnap S510 + Config\Drivers and Utilities\setup.exe"

pause

set /p var_username=Please enter the username of the person who will be using the scanner
if "%var_username%"=="" goto copy
if not "%~2"=="" goto syntax

set var_username=%var_username%


copy "\\our\network_drive\Drivers\Scanners\Scansnap S510 + Config\Configuration files\Referrals" "C:\Documents and Settings\%var_username%\Application Data\test"

:syntax
cls
echo.
echo *********************************************************
echo * Scan Snap Scanner Installation Script *
echo * Installs scanner software and Config *
echo *********************************************************
echo ************************************************************************
echo * Error, please specify a username, iam not a mind reader *
echo ************************************************************************
pause
exit
exit

:end[/CODE]

For some reason after i enter the username the script seems to fail and goes back to the end and i am not really sure why, if anyone can help i would be greatful.

Thanks

Richard

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

This topic is now closed to further replies.