I want to update AVG virus data in a Windows 7 guest VM.
I need to run "C:\Program Files\AVG\AVG2015\avgmfapx.exe".
To run that command inside the VM, I need to run it as administrator.
If I want to run it from host, I got the following error: "Error: A program could not run on the guest operating system".
Here is the command run from host:
C:\"Program Files (x86)"\VMware\"VMware VIX"\VMRun.Exe -T ws -gu "<Guest User>" -gp "<Guest Password>" runProgramInGuest "D:\Virtual Machines\Windows 7\Windows 7.vmx" "C:\Program Files\AVG\AVG2015\avgmfapx.exe" "/AppMode=UPDATE"
Note that guest user is an administrator of the VM.
I noticed that when I run "avgmfapx.exe" in guest VM, an interactive pop-up window appears that asks me if I authorize the program to modify the computer. I guess this is why it does not work.
I tried changing compatibility of "avgmfapx.exe", allowing it to run as administrator. It did not work. Windows keeps asking me, interactively, if I allow the program to modify the computer. Possibly, it is a matter of forcing Windows 7 to run "avgmfapx.exe" as an administrator without confirmation. Chances are that it is simply a matter of deactivating UAC (User Access Control) for "avgmfapx.exe".
Using "Microsoft Application Compatibility Toolkit", I was able to deactivate UAC for "avgmfapx.exe". I was then able to update AVG virus data from within Windows 7 guest, using an elevated (run as administrator) CMD window. When using non-elevated CMD window, the command generates no error, but nothing got done.
From host computer, the command no longer report an error, but nothing gets done, like executing "C:\Program Files\AVG\AVG2015\avgmfapx.exe" in guest computer with a non-elevated CMD window.
In short, VMrun needs to execute the command in an elevated session. I am back to square one. Is there an undocumented VMrun option that allows the guest session to run in elevated mode?