PDA

View Full Version : Unable to find the file



prash.suresh
08-24-2005, 04:21 AM
Guys,

I have created an Installshield11 - InstallScript project.

In this project I move a particular file, say A.DLL, into a directory in OnMoving function.

And then I execute a command which takes this file as a parameter, say "RUNDLL32.EXE A.DLL,Install", in OnMoved function.

When the install is in progress, I get an error saying "Error loading file C:\A.DLL".

But I am able to spot the file in that directory from Windows Explorer. When I got to command prompt and type the command "RUNDLL32.EXE A.DLL,Install" it works fine.

Can anybody help me out with this? I am in a mess..

Thanks a lot in anticipation

Somebody
08-24-2005, 08:56 AM
Is "C:\A.DLL" the correct path to your file? If not, maybe you need to provide the correct path to A.DLL in your RUNDLL32.EXE command line.

prash.suresh
08-24-2005, 09:18 AM
Thank you very much for replying "Somebody"

It is the perfect path.

Infact when I keep the windows explorer open, I can actually see that file physically present.

Is it some kind of a problem that happens while registration(using rundll32.exe)??

MichaelU
08-24-2005, 04:36 PM
Does A.DLL have a dependency on a file that isn't yet installed on the target machine? Generally incorrect paths or missing dependencies are the two most likely things to cause the error you report.

prash.suresh
08-25-2005, 06:13 AM
No... I use a MessageBox to indicate the path. And I dont have any dependencies

The irony is that, the same script was working fine with Installshield7 and behaves randomly in Installshield11.

I tried placing this piece of code in the OnFirstUIAfter and in OnEnd too (one at a time). They used to behave similarly

MichaelU
08-25-2005, 05:08 PM
Could it be a matter of an incorrect current working directory? Try adding a ChangeDirectory call before you LaunchAppAndWait RunDLL32. Or a quoting issue, if the path isn't literally C:\A.DLL and actually now has spaces involved where previously it wouldn't have?

prash.suresh
08-26-2005, 02:09 AM
Could it be a matter of an incorrect current working directory? Try adding a ChangeDirectory call before you LaunchAppAndWait RunDLL32. Or a quoting issue, if the path isn't literally C:\A.DLL and actually now has spaces involved where previously it wouldn't have?

Thank you very much for the suggestion mate.

I have also added a check, to see if the files (dll) exists, before the registration and also changed the directory to "c:\" before calling LaunchAppAndWait. It seems to eradicate the problem.

But how do you reason out the randomness of this behaviour?