Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to execute this

How to execute this

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anonymous
    wrote on last edited by
    #1

    hi i have the string as str1 and then concatenated in str2 and now i have to execute it str1="\"c:\Program Files\Demo\xyz.dll\"" ; str1="regsvr32.exe /u " + str1; how can i execute this programatically. Itried with ShellExecute and system but it does not work waiting for reply Best Regards

    S I 2 Replies Last reply
    0
    • A Anonymous

      hi i have the string as str1 and then concatenated in str2 and now i have to execute it str1="\"c:\Program Files\Demo\xyz.dll\"" ; str1="regsvr32.exe /u " + str1; how can i execute this programatically. Itried with ShellExecute and system but it does not work waiting for reply Best Regards

      S Offline
      S Offline
      stolid_rock
      wrote on last edited by
      #2

      Try this string sFile(_T("regsvr32")); string sParam(_T("/u \"F:\\Data\\MAPIProp\\mapiprop.dll\"")); ::ShellExecute(NULL,_T("open"),sFile.c_str(),sParam.c_str(),0,SW_SHOW);

      1 Reply Last reply
      0
      • A Anonymous

        hi i have the string as str1 and then concatenated in str2 and now i have to execute it str1="\"c:\Program Files\Demo\xyz.dll\"" ; str1="regsvr32.exe /u " + str1; how can i execute this programatically. Itried with ShellExecute and system but it does not work waiting for reply Best Regards

        I Offline
        I Offline
        includeh10
        wrote on last edited by
        #3

        u can find source code of regsvr32.exe in VC++ samples, which is just a few of lines. add the few lines inside ur app, things will be much easier and better - then you do not need regsvr32.exe again. includeh10

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups