cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Execute from Current Directory

How to execute below command in CMD, so that it get executed wherever that folder is copied & it’s not hardcoded to folder

Test.cmd content…
C:\WINDOWS\system32\MSIexec.exe /i "\\xyz\abc\sources\test.msi" TRANSFORMS="\\xyz\abc\sources\test.mst" /QR
(6) Replies
MSIexec.exe /i test.msi TRANSFORMS=test.mst /QR
Mistral wrote:
MSIexec.exe /i test.msi TRANSFORMS=test.mst /QR


i get the following message...
This installation packages could not be opened. verify that the package exists
Just put TEST.CMD into the same directory where the MSI and the MST is.
Mistral wrote:
Just put TEST.CMD into the same directory where the MSI and the MST is.


it works if i double click, but if i run as admin it doesnt work & says....
This installation packages could not be opened. verify that the package exists.

If we run as admin, by default it goes to c:\windows\system32 folder for executing.
Finally i understand why you try to accomplish.

MSIexec.exe /i "%~dp0\test.msi" TRANSFORMS="%~dp0\test.mst" /QR
Mistral wrote:
Finally i understand why you try to accomplish.

MSIexec.exe /i "%~dp0\test.msi" TRANSFORMS="%~dp0\test.mst" /QR


Its working with above command line....even i got this command from one of the fren.

Thanks a lot for all your help 🙂