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

    Open external application

    hey

    i am tring to open an external application with this line :

    Runtime.getRuntime().exec("rundll32 SHELL32.DLL,ShellExec_RunDLL \""+ "c:\\x.doc"+"\"");

    in windows xp the application "word" opens , but in windows 7 its not opens.

    anyone knows how to open externals in windows 7 ?


    thank you

    inmar

  2. #2
    Join Date
    Feb 2008
    Posts
    966

    Re: Open external application

    Most likely when you upgraded to windows 7 you got the 64 bit version, whereas your xp is still running the 32 bit version. The rundll32 and SHELL32.DLL probably either do not exist in the version of windows 7 that you have (probably unlikely, but), or their locations are not on the classpath, the classpath probably has the reference to the newer 64 bit versions.

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