PDA

View Full Version : Solved: system primitive failed



philfer
01-20-2008, 11:30 AM
I am trying to launch an app using the Shell method. However I get an area which says "System Primitive Failed"

When I go to the apps .exe file and click it it wont launch. However the icon on my desktop leads me to a "Windows NT Command Shell" which when I double click launches the app.

The command shell reads :-

SET ___COMPAT_LAYER = 256Color
START ...\Program\Phil.exe


How do I incorporate this into the Shell and SendKeys methods to launch and manipulate the app.

(By the way before anyone mentions it - the app is old and rubbish and I dont have access to any object model info!)

Tommy
01-20-2008, 04:27 PM
This should work for you :)


Dim RetVal As Double
RetVal = Shell("SET ___COMPAT_LAYER = 256Color" & Chr(13) & _
"START ...\Program\Phil.exe")

philfer
01-25-2008, 12:50 PM
Hi Tommy,

It didnt work.

It said File not found?!?!?

Tommy
02-01-2008, 11:41 AM
I would suggust that you find out where Phil.exe is and put the whole path to it instead of the "...\"

Then :
RetVal = Shell("SET ___COMPAT_LAYER = 256Color" & Chr(13) & _ "C:\Fullpath\Program\Phil.exe")