Loading
LaunchApp Windows 7
Hi All!

 

I try to launch dpinst.exe on Windows 7 32-bit and dpinst64.exe on Windows 7 64-bit via LaunchAppAndWait but it doesn't works?

 

When I execute both programs by double clicking they are working fine after

 

confirming dialogue for administrator rights.

 

LaunchAppAndWait returns 0 this means the application was launched.

 

Bye, Mike Maico.

  • Hi Mike,

     

    don't really have an answer but two ideas:

     

    1. Check dpinst.exe's return value via LAAW_PARAMETERS after LaunchAppAndWait for any problems.

     

    2. I remeber a problem with dpinst when setting the wrong working dir. Afaik, when you double click it, the working dir is set to the file location, but this is not done when you LaunchApp the file (dpinst /path sets the working dir).

     

    Hope that helps.

     

    Johannes
    Expand Post
  • You might want to switch from LaunchAppAndWait to LaunchApplication, and see if that helps. For more information, see the following help topic (especially the first bullet point in the Additional Information section):

     

    LaunchApplication
  • Thank you Debbie and Johannes!

     

    Solution:

     

    exePath=SRCDIR;

     

    if(SYSINFO.bIsWow64 == 0)then//... 32 bit

     

    programWithPath=exePath^"DPInst.exe";

     

    else

     

    programWithPath=exePath^"DPInst64.exe";

     

    endif;

     

    LongPathToQuote(exePath, TRUE);

     

    LongPathToQuote(programWithPath, TRUE);

     

    result=LaunchApplication

     

    (

     

    programWithPath,//szProgram

     

    "",//szCmdLine

     

    exePath,//szDirectory

     

    SW_NORMAL,//nShowWindow

     

    INFINITE,//nTimeOut

     

    LAAW_OPTION_WAIT |

     

    LAAW_OPTION_CHANGEDIRECTORY |

     

    LAAW_OPTION_USE_SHELLEXECUTE

     

    );
    Expand Post

Loading
LaunchApp Windows 7