I am trying to run a batch file that will install several applications without the need for user intervention. All of these applications are installed using their own batch files.
The issue I am having is that I cannot seem to get the file to run from the current directory correctly. I have tried to use the “cd /d %~dp0” and the “%CD%” commands and I get the message that the file path is not found. It looks like when running the batch file it is adding an extra backslash command.
The code starts off as follows
SET DRIVE1=%CD%
SET PATHWAY=%~DP0
SET APPL=1
SET INSTALL=
SET /A MARK=0
SET INSTALL1="APPLICATION NAME"
SET PATH1=%DRIVE%\"APPLICATION LOCATION"
SET CMDFOR1="APPLICATION BATCHFILE NAME"
Try changing:
to this:
Note that the quotation is moved to the left of the
%DRIVE%variable.