Computing.Net > Forums > Programming > msiexec batch file quotes problem

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

msiexec batch file quotes problem

Reply to Message Icon

Name: d4rkcell
Date: August 3, 2009 at 01:08:47 Pacific
OS: Microsoft Windows XP Professional
CPU/Ram: 2.327 GHz / 2013 MB
Product: Dell / OPTIPLEX 755
Subcategory: Batch
Comment:

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



Sponsored Link
Ads by Google

Response Number 1
Name: Razor2.3
Date: August 5, 2009 at 06:59:07 Pacific
Reply:

Try:

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


0

Response Number 2
Name: klint
Date: August 7, 2009 at 07:45:31 Pacific
Reply:

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


0

Response Number 3
Name: d4rkcell
Date: August 7, 2009 at 09:36:50 Pacific
Reply:

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


0

Response Number 4
Name: d4rkcell
Date: August 17, 2009 at 00:47:09 Pacific
Reply:

thanks klint your solution worked great


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: msiexec batch file quotes problem

Batch File Programming Problem! www.computing.net/answers/programming/batch-file-programming-problem/14423.html

Nesting variables in batch files ? www.computing.net/answers/programming/nesting-variables-in-batch-files-/14334.html

Batch file commands & drive labels www.computing.net/answers/programming/batch-file-commands-drive-labels/17477.html