Consulting

Results 1 to 4 of 4

Thread: Solved: system primitive failed

  1. #1
    VBAX Tutor
    Joined
    Nov 2007
    Posts
    291
    Location

    Solved: system primitive failed

    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!)

  2. #2
    Moderator VBAX Master Tommy's Avatar
    Joined
    May 2004
    Location
    Houston, TX
    Posts
    1,184
    Location
    This should work for you

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

  3. #3
    VBAX Tutor
    Joined
    Nov 2007
    Posts
    291
    Location
    Hi Tommy,

    It didnt work.

    It said File not found?!?!?

  4. #4
    Moderator VBAX Master Tommy's Avatar
    Joined
    May 2004
    Location
    Houston, TX
    Posts
    1,184
    Location
    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")

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •