-
Jan 8th, 2017, 08:02 PM
#1
Thread Starter
Hyperactive Member
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
-
Jan 8th, 2017, 08:45 PM
#2
Re: Problem using Shell RunDll32
Have you tried enclosing the paths in quotes?
-
Jan 8th, 2017, 09:54 PM
#3
Thread Starter
Hyperactive Member
Re: Problem using Shell RunDll32
Yes, I have tried in many ways, but no luck.
-
Jan 8th, 2017, 09:58 PM
#4
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?
-
Jan 8th, 2017, 10:16 PM
#5
Thread Starter
Hyperactive Member
Re: Problem using Shell RunDll32
No, let me explain, thats the full path, actually thats the path of an uninstallation for a Toshiba app.
-
Jan 8th, 2017, 10:17 PM
#6
Thread Starter
Hyperactive Member
Re: Problem using Shell RunDll32
And yes, that's correct, the issue here is the order or the way the quotes goes
-
Jan 9th, 2017, 04:53 AM
#7
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
-
Jan 9th, 2017, 05:59 AM
#8
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!
-
Jan 9th, 2017, 09:28 AM
#9
Re: Problem using Shell RunDll32
-
Jan 10th, 2017, 11:29 AM
#10
Thread Starter
Hyperactive Member
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!
-
Jan 10th, 2017, 01:36 PM
#11
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!
-
Jan 10th, 2017, 08:39 PM
#12
Thread Starter
Hyperactive Member
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
-
Jan 11th, 2017, 08:30 AM
#13
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.
-
Jan 11th, 2017, 10:59 AM
#14
Thread Starter
Hyperactive Member
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.
-
Jan 11th, 2017, 11:00 AM
#15
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!
-
Jan 11th, 2017, 01:24 PM
#16
Thread Starter
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|