Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: BUILD
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 26-Apr-12 1:50am
Edited 26-Apr-12 23:22pm
v4
Comments
SAKryukov at 27-Apr-12 15:43pm
   
Not clear how parameters can help you here...
--SA
kumarv543 at 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

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  
Comments
kumarv543 at 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
SAKryukov at 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)

  Print Answers RSS
0 CPallini 375
1 Sergey Alexandrovich Kryukov 370
2 BillWoodruff 314
3 George Jonsson 279
4 OriginalGriff 257
0 OriginalGriff 5,030
1 CPallini 4,115
2 Sergey Alexandrovich Kryukov 3,554
3 George Jonsson 2,826
4 Gihan Liyanage 2,386


Advertise | Privacy | Mobile
Web03 | 2.8.140916.1 | Last Updated 27 Apr 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100