Command line question...
Let me see how to best explain it one go...
Well, let's say you are packaging an applicattion to be installed locally...There is a MSI and a MST...Let's say you are installing it from your desktop so the command line would be "C:\Documents and Settings\Username\Desktop\ApplicationFolder\Application.msi TRANSFORMS="C:\Documents and Settings\Username\Desktop\ApplicationFolder\Application.mst".
You make a batch file with the command lines in it. The user double clicks the BAT file and the application is installed. Provided the MSI and MST remain in the location the command lines point to. However, not all users will be installing it from the desktop. They could be using any folder in any location.
So my question is, how would one write a command line to install the MSI and MST from a given folder in any location?
I hope I did a good job translating my thoughts...
Well, let's say you are packaging an applicattion to be installed locally...There is a MSI and a MST...Let's say you are installing it from your desktop so the command line would be "C:\Documents and Settings\Username\Desktop\ApplicationFolder\Application.msi TRANSFORMS="C:\Documents and Settings\Username\Desktop\ApplicationFolder\Application.mst".
You make a batch file with the command lines in it. The user double clicks the BAT file and the application is installed. Provided the MSI and MST remain in the location the command lines point to. However, not all users will be installing it from the desktop. They could be using any folder in any location.
So my question is, how would one write a command line to install the MSI and MST from a given folder in any location?
I hope I did a good job translating my thoughts...
0 Comments
[ + ] Show comments
Answers (12)
Please log in to answer
Posted by:
troy_in_wi
14 years ago
Posted by:
Repackman
14 years ago
ORIGINAL: troy_in_wi
Code in the batch file to create a folder and copy the MSI and MST to that folder and then execute it. That way they all have the same folder in the same location and the files have been copied down to them.
What would the code look like? What would be its syntax? That's what I am asking...In theory I can think of doing many things...
Posted by:
bearden3
14 years ago
Hey Repackman.
Why not put the MSI and MST onto a network share instead? Then you can put a batch file in that same folder as the MSI/MST calling the install to run. Then you could send out an e-mail to each person who is going to install it and give them the path to the batch file they can run (you could even put it as a hyperlink in the e-mail so that they could install by clicking the hyperlink).
I guess your users have rights to install software? Most places have restrictions so that users can't install software...
Why not put the MSI and MST onto a network share instead? Then you can put a batch file in that same folder as the MSI/MST calling the install to run. Then you could send out an e-mail to each person who is going to install it and give them the path to the batch file they can run (you could even put it as a hyperlink in the e-mail so that they could install by clicking the hyperlink).
I guess your users have rights to install software? Most places have restrictions so that users can't install software...
Posted by:
Repackman
14 years ago
ORIGINAL: bearden3
Hey Repackman.
Why not put the MSI and MST onto a network share instead? Then you can put a batch file in that same folder as the MSI/MST calling the install to run. Then you could send out an e-mail to each person who is going to install it and give them the path to the batch file they can run (you could even put it as a hyperlink in the e-mail so that they could install by clicking the hyperlink).
I guess your users have rights to install software? Most places have restrictions so that users can't install software...
Ideally it will be put up on an intranet page, with the ability for employees/users to download and then install it themselves from there...
Posted by:
troy_in_wi
14 years ago
I think this code will work to execute the MSI and MST and create a verbose log file. You'll have to search for cmd file syntax to create a folder and copy files from a network path.
set xmsi=C:\Apps\temp\mypackage.msi
set mytrans=C:\Apps\temp\mytrans.mst
msiexec /i "%xmsi%" /qn /l*v+ "C:\Apps\Logs\mypackagelog-MSI.log" TRANSFORMS="%mytrans%"
set xmsi=C:\Apps\temp\mypackage.msi
set mytrans=C:\Apps\temp\mytrans.mst
msiexec /i "%xmsi%" /qn /l*v+ "C:\Apps\Logs\mypackagelog-MSI.log" TRANSFORMS="%mytrans%"
Posted by:
Repackman
14 years ago
ORIGINAL: troy_in_wi
I think this code will work to execute the MSI and MST and create a verbose log file. You'll have to search for cmd file syntax to create a folder and copy files from a network path.
set xmsi=C:\Apps\temp\mypackage.msi
set mytrans=C:\Apps\temp\mytrans.mst
msiexec /i "%xmsi%" /qn /l*v+ "C:\Apps\Logs\mypackagelog-MSI.log" TRANSFORMS="%mytrans%"
Thanks Troy for taking the time to write that...However as I mentioned to bearden, it will be up on an intranet...People will download it and install it on their systems...It's for some people with elevated permissions so they can do that...One package, one download...
Posted by:
bearden3
14 years ago
whoever is responsible for the intranet page can create the code so that when the user clicks the hyperlink, it will copy the MSI, MST and batch file down to the local temp folder (e.g. %temp%), then kick off the batch file.
Then the installer files will be on the local temp folder (which could be c:\windows\temp, c:\temp, etc.) as well at the batch file.
The batch file could contain numerous things but essentially what Troy wrote should work. You could also do it something like this if you are going the batch file route:
@echo off
start "" msiexec /i appname.msi transforms=appanme.mst /l*v! %temp%\appname.log /qn
If the batch file is in the same folder as the msi and mst, then the above should run silently and create a log file in the %temp% folder.
Again, assuming the users will have appropriate rights to perform the above.
Then the installer files will be on the local temp folder (which could be c:\windows\temp, c:\temp, etc.) as well at the batch file.
The batch file could contain numerous things but essentially what Troy wrote should work. You could also do it something like this if you are going the batch file route:
@echo off
start "" msiexec /i appname.msi transforms=appanme.mst /l*v! %temp%\appname.log /qn
If the batch file is in the same folder as the msi and mst, then the above should run silently and create a log file in the %temp% folder.
Again, assuming the users will have appropriate rights to perform the above.
Posted by:
Repackman
14 years ago
ORIGINAL: bearden3
whoever is responsible for the intranet page can create the code so that when the user clicks the hyperlink, it will copy the MSI, MST and batch file down to the local temp folder (e.g. %temp%), then kick off the batch file.
Then the installer files will be on the local temp folder (which could be c:\windows\temp, c:\temp, etc.) as well at the batch file.
The batch file could contain numerous things but essentially what Troy wrote should work. You could also do it something like this if you are going the batch file route:
@echo off
start "" msiexec /i appname.msi transforms=appanme.mst /l*v! %temp%\appname.log /qn
If the batch file is in the same folder as the msi and mst, then the above should run silently and create a log file in the %temp% folder.
Again, assuming the users will have appropriate rights to perform the above.
Bearden, I tried...But I think there must be a path variable defined...
Posted by:
Repackman
14 years ago
Posted by:
anonymous_9363
14 years ago
Posted by:
thugz888
14 years ago
Hi Repackman
This might help you. Create a folder that the client will download that has the MSI, MST and Batch File inside it. The batch file will have a command like this:
@ECHO OFF
CALL C:\Windows\System32\msiexec /i Setup.MSI TRANSFORMS=Setup.MST /qb
EXIT
If the location of the MSI and MST is the same with the batch file it will read it automatically even if you don't include the location of the MSI and MST on the command. Hope this helps.
This might help you. Create a folder that the client will download that has the MSI, MST and Batch File inside it. The batch file will have a command like this:
@ECHO OFF
CALL C:\Windows\System32\msiexec /i Setup.MSI TRANSFORMS=Setup.MST /qb
EXIT
If the location of the MSI and MST is the same with the batch file it will read it automatically even if you don't include the location of the MSI and MST on the command. Hope this helps.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.