Jump to content

Batch File not copying over to c:\drive


Recommended Posts

Hi All.

I like to run this batch file (Batch1.cmd) to install my file and than copy over second batch file and than run it to complete the task, I am not having much luck.

@echo off&color 0b&cls

echo.&echo running MyFile silent install...

start "" /wait MyFile.msi /qb

echo.&echo done

echo.&echo copying Registration to MyFile

MyFile copy Registration .txt "C:\Program Files\MyDirectory\"

copy batch2.cmd "C:\Program Files\MyDirectory\"

call Batch2.cmd /run

echo.&echo done

This my config.js line

cmds[pn]=['"%wpipath%\\Install\\Applications\\****\\Batch1.cmd"'];

Where am I goning wrong

Link to comment
Share on other sites


start "" /wait MyFile.msi /qb

I always

start /wait msiexec.exe /i myfile.msi /q[]

Can someone smart (or a finer googler than I) tell me what the difference is? I tested with acroread.msi and i get the same exact behavior regardless of syntax.

Edited by iamtheky
Link to comment
Share on other sites

Why do you not use one batch-file for your complete task?!?

You can try this - this should work

@ECHO OFF
COLOR 0b
CLS

REM change directory to the batch-directory
PUSHD "%~dp0"
ECHO.
ECHO running MyFile silent install...
START "" /wait MyFile.msi /qb
ECHO.
ECHO done

ECHO.
ECHO copying Registration to MyFile
ECHO copy Registration.txt "%PROGRAMFILES%\MyDirectory\"
COPY /Y batch2.cmd "%PROGRAMFILES%\MyDirectory\"

PUSHD "%PROGRAMFILES%\MyDirectory\"
CALL Batch2.cmd /run
POPD
ECHO.
ECHO done
POPD

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...