Hi there,

I'm trying to run external CMD over VBS code inside VB6 application, but I got error message:

Code:
Error: 11

You cannot service a running 64-bit operating system with a 32-bit version of DISM.
Please use the version of DISM that corresponds to your computer's architecture.
The code follows:
Code:
Call RunCmd2("DISM /Online /Cleanup-Image /ScanHealth")
Code:
Public Sub RunCmd2(stCmd As String)
 
 Dim objShell As Object
 
 Set objShell = CreateObject("Shell.Application")
 
 objShell.ShellExecute "cmd.exe", "/k " & stCmd, "", "runas", 1
 
 Set objShell = Nothing
 
 Exit Sub
End Sub
I'm using VB6 on Microsoft Windows 7 64-bit edition.

Any help / suggestions would be appreciated!