Page 1 of 1

Starting a Console application from Salamander

Posted: 19 Feb 2012, 13:46
by Jens
I am not sure if the problem I describe is a bug or not, but it certainly has caused me a lot of problems:
If I start an .exe file from Salamander's 'command-line' (v. 2.54), the program fails when it try to establish an ado connection to SQLServer. It fails with the error 'Class not registered'.
When the program is started from the Windows Command Prompt ('dos-box') it works ok.

Using processmonitor (sysinternals.com), I found that the application searches msado15.dll in wrong folder.
I attach 2 screenshots from ProcessMonitor showing the path being searched for msado15.dll

App started from Salamander
app_started_from_salamander.png
app_started_from_salamander.png (36.18 KiB) Viewed 6389 times
App started from Command line
app_started_from_commandline.png
app_started_from_commandline.png (12 KiB) Viewed 6389 times
Thanks

Re: Starting a Console application from Salamander

Posted: 20 Feb 2012, 02:32
by SelfMan
I believe Salamander's CMD is started as a 32 bit process. The system one is 64 bit. Thus the difference locating the library.
Have you tried to execute the program on a 32bit system?

Re: Starting a Console application from Salamander

Posted: 20 Feb 2012, 10:02
by Jan Rysavy
Note for Czech readers: http://forum.altap.cz/viewtopic.php?f=6&t=3502

You can try to change "ComSpec" environment variable from ComSpec=%SystemRoot%\system32\cmd.exe to ComSpec=%SystemRoot%\Sysnative\cmd.exe to start x64 version of Command Shell.

Re: Starting a Console application from Salamander

Posted: 21 Feb 2012, 00:05
by Ether
I have to say that the 32-bit search paths are very weird (unexpanded environment variables, concatenated absolute paths). There may be something else going on there.