Results 1 to 16 of 16

Thread: Problem using Shell RunDll32

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2013
    Posts
    330

    Exclamation Problem using Shell RunDll32

    I'm having a problem using Shell RunDll32, this is the complete path and command:
    Code:
    Shell RunDll32 C:\Program Files (x86)\Common Files\InstallShield\Professional\RunTime\10\00\Intel32\Ctor.dll,LaunchSetup "C:\Program Files (x86)\InstallShield Installation Information\{970472D0-F5F9-4158-A6E3-1AE49EFEF2D3}\setup.exe -l0x9 -removeonly", vbMaximizedFocus
    This is the generate ERROR message:

    RunDLL
    ------------------------------------------------
    There was a problem starting C:\Program
    The specified module could not be found.
    ------------------------------------------------

    Any suggestion would be nice.
    Thanks

  2. #2
    PowerPoster PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Pontypool, Wales
    Posts
    2,458

    Re: Problem using Shell RunDll32

    Have you tried enclosing the paths in quotes?

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2013
    Posts
    330

    Re: Problem using Shell RunDll32

    Yes, I have tried in many ways, but no luck.

  4. #4
    PowerPoster PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Pontypool, Wales
    Posts
    2,458

    Re: Problem using Shell RunDll32

    It is just that in the sample you posted you haven't put the full path to Ctor.dll in quotes, the error seems to be down to the spaces in the folder name.

    If you try putting the full path in quotes does it give a different error?

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2013
    Posts
    330

    Re: Problem using Shell RunDll32

    No, let me explain, thats the full path, actually thats the path of an uninstallation for a Toshiba app.

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2013
    Posts
    330

    Re: Problem using Shell RunDll32

    And yes, that's correct, the issue here is the order or the way the quotes goes

  7. #7
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Problem using Shell RunDll32

    put your paths into a string that you can print to the immediate window to see it is correct

    try like
    Code:
    cmd = "Rundll32.exe ""C:\Program Files (x86)\Common Files\InstallShield\Professional\RunTime\10\00\Intel32\Ctor.dll,LaunchSetup"" ""C:\Program Files (x86)\InstallShield Installation Information\{970472D0-F5F9-4158-A6E3-1AE49EFEF2D3}\setup.exe -l0x9 -removeonly"""
    Debug.Print cmd
    Shell cmd, vbMinimizedFocus
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  8. #8
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,834

    Re: Problem using Shell RunDll32

    Notice the file path in the error message stops at the first space:

    There was a problem starting C:\Program <====

    That is the issue.
    Please remember next time...elections matter!

  9. #9
    PowerPoster
    Join Date
    Jun 2015
    Posts
    2,224

    Re: Problem using Shell RunDll32

    This post might help, for some odd instances.

    http://www.vbforums.com/showthread.p...=1#post5123511

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2013
    Posts
    330

    Re: Problem using Shell RunDll32

    Hey guys, thank you all for your help, I found the solution.
    I shorten the path by changing this part:
    "C:\Program Files (x86)\Common Files\InstallShield\Professional"
    To this: "C:\PROGRA~2\COMMON~1\INSTAL~1\PROFES~1"
    and it worked like a charm!
    no popup errors no nathing!

  11. #11
    Frenzied Member
    Join Date
    Mar 2008
    Posts
    1,210

    Re: Problem using Shell RunDll32

    Coding - You may find that does not work if use of short (8.3) file names is disabled on the target drive. See my post #12 in http://www.vbforums.com/showthread.p...t-working-help!

  12. #12

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2013
    Posts
    330

    Re: Problem using Shell RunDll32

    Okay, I see Magic Ink, maybe you are right.
    Honestly this is my first time getting this problem.
    But I feel good having solved the problem I had.
    I will bookmark your solution as well just in case.
    Thanks

  13. #13
    PowerPoster PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Pontypool, Wales
    Posts
    2,458

    Re: Problem using Shell RunDll32

    So if you tried putting both paths in quotes did you still get the error?

    e.g.
    Code:
    Shell RunDll32 "C:\Program Files (x86)\Common Files\InstallShield\Professional\RunTime\10\00\Intel32\Ctor.dll,LaunchSetup" "C:\Program Files (x86)\InstallShield Installation Information\{970472D0-F5F9-4158-A6E3-1AE49EFEF2D3}\setup.exe -l0x9 -removeonly", vbMaximizedFocus
    I am only asking because not only could your solution fail if short file names are disabled (as Magic Ink pointed out) there is no guarentee that you will always get the same short filename generated for the various portions of the path.

  14. #14

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2013
    Posts
    330

    Re: Problem using Shell RunDll32

    Yes Plausibly, I tried all possible ways.
    I also tried westconn example, but the path was correct, but could not get it to run until I did what I did.
    but thank you so much for your help.

  15. #15
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,834

    Re: Problem using Shell RunDll32

    Is it still displaying:

    There was a problem starting C:\Program

    or is more of the path visible?
    Please remember next time...elections matter!

  16. #16

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2013
    Posts
    330

    Re: Problem using Shell RunDll32

    Thanks Tyson, I solved the problem, I posted it on post#10.
    I don't get that annoying popup error no more.

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