msiexec batch file quotes problem

Dell / OPTIPLEX 755
August 3, 2009 at 01:08:47
Specs: Microsoft Windows XP Professional, 2.327 GHz / 2013 MB
Hello,

I am using vb to select a number of files from a number of directories and then write the file path to a text file called sample.txt

My sample.txt currently has one line in it that looks like this.

"c:\temp\New Folder\test.msi"

I am then running the following batch code.

@FOR /F %%a IN (c:\temp\sample.txt) DO msiexec /i %%a

I am getting the following error, that the installation path could not be found, I cant help notice that in the command window the command it is trying to run is as follows.

msiexec /i "c:\temp\New

Seems as though the spaces in the path are messing it up, but i have got the path in quotes??

Can anyone speculate as to what the problem here might be?

Thanks


See More: msiexec batch file quotes problem

Report •


#1
August 5, 2009 at 06:59:07
Try:
@FOR /F %%a IN (c:\temp\sample.txt) DO msiexec /i "%%a"


Report •

#2
August 7, 2009 at 07:45:31
@FOR /F "delims=" %%a IN (c:\temp\sample.txt) DO msiexec /i %%a


Report •

#3
August 7, 2009 at 09:36:50
Hi guys, I am off work ill so can't test this as all the code is on my office computer but i did try Razor2.3's solution before posting here and it didn't have the desired effect. Thanks anyway mate.

I will give klint's solution a bash on Monday and report back.

Thanks guys


Report •

Related Solutions

#4
August 17, 2009 at 00:47:09
thanks klint your solution worked great

Report •


Ask Question