script is not working when saved as bat

I am trying to install a .msi application using a batch file. I typed the below command in CMD and hit enter then the application got installed. Then i create a batch script with the same command and when i run the script it is not installing. i typed the same below command in notepad and saved it as .bat but it does not work.  

msiexec /q /i C:\CB\installer_vista_win7_win8-64- COMPANY_CODE=XXXXXXXXXXXXXXXXX GROUP_NAME=Advanced-Default

Open in new window

Debrata 1Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NVITEnd-user supportCommented:
What errors or messages do you get?
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
Run a prompt, and execute the batch from there to see error messages, instead of starting from Explorer directly - if not already done that way.
Debrata 1Author Commented:
I don't get no error it just doesn't install or where do i check the error ?
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

Gerwin Jansen, EE MVETopic Advisor Commented:
Add a pause statement as a last line in your .bat file. That may show you what is going wrong.

How exactly do you run the script? Double click in Explorer? Schedule? Type in cmd window?
Bill PrewIT / Software Engineering ConsultantCommented:
Make sure you didn't save the BAT file as MSIEXEC.BAT, that won't work, it will loop calling itself when you run it.  Give a name that isn't any existing command already, perhaps "MYCBINSTALL.BAT" or something else unique.

Debrata 1Author Commented:
Currently i am double clicking it from the desktop but after i make sure i have a solid script my plan is to make a GPO log on script.
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
As stated, either open up a Command Prompt window, and execute the batch file there (e.g. by dragging it from Explorer into the prompt window), or add a pause at the end of the script. Both will allow you to see error messages and command output.
Debrata 1Author Commented:
I have attached what i am getting when  added pause at the end of the script. when i press a key CMD closes and nothing happens.

Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
So the batch works fine, not spitting out any error. There should be no difference between using the batch and typing the command. Can you try if it works in an Admin Command Prompt?
It might also help troubleshooting if you omit the /q from msiexec.
Gerwin Jansen, EE MVETopic Advisor Commented:
You could add the following line above the pause command:


It could give you the 'result' of the previous command. 0 means it ran OK, some other number would mean something went wrong.
Debrata 1Author Commented:
Does this mean there is an error
David Johnson, CD, MVPOwnerCommented:
1603 is a generic error
one of the reasons you get it is because the application is already installed

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Gerwin Jansen, EE MVETopic Advisor Commented:
yes that is an error, as I said 0 (zero) means is everything OK, other numbers are not
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.