Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using the installation of .msi file by using
msiexec /i D:\Download\7z920.msi /qn
in batch file.

But I need to replace the values and I need to select the value from drop-down when Installation is happening. Please Help me. URGENT
Posted
Updated 26-Apr-12 23:22pm
v4
Comments
Sergey Alexandrovich Kryukov 27-Apr-12 15:43pm    
Not clear how parameters can help you here...
--SA
kumarv543 30-Apr-12 2:16am    
Hi,
I need to change the values when .msi file installing like Name of the virtual Directory at when it is installing

1 solution

Please see my comment. Anyway, do you just want to know how parameters work with batch files?

Suppose you want to abstract out "/i", "D:\Download\7z920.ms" and "qn". In this case you could have the batch file myBatch.bat
msiexec %1 %2 %3
and execute it as
myBatch.bat /i D:\Download\7z920.msi /qn
Apparently, it won't get much benefits. I helps if same parameters are hard-coded in batch file and some are passed to the batch caller:
msiexec /i %1 /qn
and execute it as
myBatch.bat D:\Download\7z920.msi
to hide rarely changed detail.

Also, it helps if something else (another batch file) executes/starts your batch file with different parameters several time, for example, in a loop.

—SA
 
Share this answer
 
Comments
kumarv543 30-Apr-12 2:15am    
Hi,
I need to change the values when .msi file installing like Name of the virtual Directory at when it is installing
Sergey Alexandrovich Kryukov 30-Apr-12 18:42pm    
Well, you asked about the use of batch files with parameter. What is still unclear? Apply these ideas to the parameters you need to pass...
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900