CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 1999
    Posts
    10

    Using WinExec() Function

    How can I use this funtion to execute file with *.lnk extention, Kindly i want to execute the shortcut in sendto directory.


  2. #2
    Join Date
    May 1999
    Location
    Miami, Florida
    Posts
    242

    Re: Using WinExec() Function

    If I wanted to run 'notepad.exe' using WinExec() I would use

    const char cmdLine[]="\\windows\\notepad.exe";
    UINT result = WinExec(cmdLine, SW_SHOW);
    if (result<32)
    {
    // handle error
    }



    I don't know whether the *.lnk extension effects the use of the WinExec() command. Try using cmdLine[]="\\yourfile.lnk";


Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured