vba shell command failing - Advanced Installer Community
burgr86
Posts: 4
Joined: Sat May 14, 2016 8:56 pm

vba shell command failing

I have a problem that I cannot seem to resolve. When I try to run my installer via vba in a VMware workstation virtual machine, it gives me "Invalid Procecedure Call or Argument Error". This happens only inside a VM. The installer itself works perfectly when not called via the shell command. The shell command also works without error outside of the VM in Host OS (Windows 7). Strangely enough when I call other .exe files via shell inside the VM they work fine, leading me to believe the problem lies with my installer. See examples below. Any help would be appreciated.

Does not work inside any VM.
Private Sub sftp_runInstaller()

Dim x As Variant
Dim Path As String


Path = "C:\weekly work schedule files\installers\WeeklyWorkScheduler7.2.4_Installer.exe"

x = Shell(Path, vbNormalFocus)

End Sub


Works fine inside vm
Private Sub sftp_runInstaller()

Dim x As Variant
Dim Path As String

Path = "C:\windows\system32\mspaint.exe"

x = Shell(Path, vbNormalFocus)

End Sub
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: vba shell command failing

Hello,

Please accept our apologies for this delayed reply.

We'll start test and investigating this scenario and we'll get back to you as soon as we have a resolution.

Thank you for your patience and understanding.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”