Link to home
Start Free TrialLog in
Avatar of Mr.X
Mr.X

asked on

batch file which has msi not working

Hi guys,

I got a batch file which has

Msiexec \i \\servername\foldername\filename.msi PIDKEY=xxxx LAUNCHAPP=1

Am trying to install antivirus msi file through group policy to all computers. Before that just checking my batch file is working or not.

I tried from one computer. I can access the server share. So no issues with permissions. But when ever I run that batch file by double clicking or run as administrator it comes with a “windows installer” box giving options what commands to use. But not installing

Could you guys, see whether my batch file is correct or not ?? and the pidkey I used at end is the installer key for antivirus so doesn’t need to put in manually
Avatar of Ogandos
Ogandos
Flag of Canada image

Hello MrX,

Could you try your batch in this way? ...

Msiexec   /i   "\\servername\foldername\filename.msi"   PIDKEY="xxxx"    LAUNCHAPP="1"   /quiet
Avatar of oBdA
oBdA

You're using \"i" instead of "/i".
In a batch, run msi like that:
start "" /wait msiexec /i \\servername\foldername\filename.msi PIDKEY=xxxx LAUNCHAPP=1 /quiet /norestart

Open in new window

Avatar of Mr.X

ASKER

Hi,

I tried both of yours command. When I double click it just opens cmd(showing the command) and closing within few seconds. But not installing anything
Don't double-click it for testing. Open an elevated command prompt, run the batch from there, then it'll stay open and you can see what's happening.
Especially since double-clicking means it's not running elevated, unless you're logged on with the default local administrator or UAC is disabled.
Avatar of Mr.X

ASKER

Ya i Ran as administrator as well. Still it's not doing anything
Then you need to log the install and check the log file afterwards:
start "" /wait msiexec /i \\servername\foldername\filename.msi PIDKEY=xxxx LAUNCHAPP=1 /quiet /norestart /liewa "C:\Temp\msi.log"
echo Finished with ErrorLevel %ErrorLevel%

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Qlemo
Qlemo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial