1

I'm having a hell of a time getting a legacy wise installer to work. Near the end of the process the installer runs a vb script and the following steps happen

  1. cscript - runs vbs file called runscriptupdates.
  2. Runscriptupdates.vbs - calls a COM dll named Remote.dll
  3. Remote.dll - Calls another dll called libmcl.dll
  4. An error message is pumped out

failed to insert xyz.csv error 53 File not found: libmcl-2.7.0.dll, line 0, file=C:\DATA\CLIENT\xyz.csv

So the conclusion is that the cscript/vbs/remote.dll can't find libmcl-2.7.0.dll. I can reproduce the same behaviour of the installer by running the script manually and here's what I've tried so far but I'm still getting the same failure message.

  1. Copied libmcl to directory of cscript
  2. Copied libmcl to directory of remote.dll
  3. Copied libmcl to directory of runscriptupdates.vbs
  4. I turned on fusion logs to see if that had any pointers but because it's not .NET there's nothing of use
  5. Tried to register libmcl with regsrv but it can't

At this moment if I check the path from a command prompt the folder holding libmcl isn't in the path. However if I check it through the myComputer->Advanced->EnvironmentVariables the folder is in the path.

If I restart the machine after the attempted install and then run the installer again it works no problem. I feel like it must be the path not being updated properly at the time of install or something like that. Is there a way to force an update after making an addition to the path?

Thanks, Neil

Neil
  • 5,179
  • 8
  • 48
  • 87

2 Answers2

0

Try running it with the 32bit cscript.exe:

> C:\Windows\SysWOW64\cscript.exe runscriptupdates.vbs

Any difference?

Nathan Rice
  • 3,091
  • 1
  • 20
  • 30
  • It's a 32bit w2k3 server machine so no syswow64, I'm now trying to set the path variable with the setx command and then launch a new command prompt to run the script in which according to my research may work. – Neil Apr 11 '12 at 07:54
0

I finally found a solution with help from another question I found

Is there a command to refresh environment variables from the command prompt in Windows?

I created a vb script ResetEnvironmentVariables.vbs then created a batch file to package them all up.

Runscriptupdates.bat
--------------------------
cscript ResetEnvironmentVariables.vbs
call "%TEMP%\ResetEnvironmentVariables.bat"
cscript Runscriptupdates.vbs %1 %2 %3 ... %n

So this allowed the runscriptupdates to find the libmcl dll and start working again! whew!

Community
  • 1
  • 1
Neil
  • 5,179
  • 8
  • 48
  • 87