I have a clients application that I am having trouble with. I start it from Autoit code using Run. Autoit is just a scripting language if your not familiar with it.

We have received a new version of the program from the client. They added a sign in form when the program starts. Now the program starts, the splash screen comes up as it always has, and then the new sign in form pops up. You sign in and then the main form opens. This new version runs fine from the desktop shortcut and even when started by navigating to the .EXE and double clicking it.

But when I start it from AutoIt it starts, splash screen displays, and asks for the sign in like normal, but after entering username and password it gets an error.

enter image description here

Not very informative. I tried to start it from the command prompt and I get the same error. I tried running the command prompt as administrator and get the same thing.

On a PC with the old version, I have verified that I can start the old version from the command line with no issues. I have verified that I can start other programs from the command prompt since I saw a post here about not being able to start any programs from the command line.

The program is installed by default to run in compatibility mode (XP SP 3).

Any ideas why it would act different like this being started from the command line?

EDIT: Just found a log.

2015-12-15 08:20:07,847 [1] ERROR log4com - Main ERROR: Error in application start up. Cannot create ActiveX component.
2015-12-15 08:20:25,520 [1] ERROR log4com - Main Exception MSG: Cannot create ActiveX component.
2015-12-15 08:20:25,542 [1] ERROR log4com - Main Exception SRC: Microsoft.VisualBasic. 
2015-12-15 08:20:25,542 [1] ERROR log4com - Main Exception Stack:    at Microsoft.VisualBasic.Interaction.CreateObject(String ProgId, String ServerName)
   at DESKTOP32.BSTDesktop.ConnectToJMS()
   at DESKTOP32.BSTDesktop.Main(). 
2015-12-15 08:20:25,543 [1] ERROR log4com - Main No inner exception. 
2015-12-15 08:20:25,544 [1] INFO  log4com - Time Tuning Releasing wfSystem object took up to 1 seconds.
2015-12-15 08:20:25,955 [1] INFO  log4com - Time Tunning Realizing JMSAPI and Database objects took up to 1 seconds.
  • I haven't used Autoit but it may be helpful to post some of the 'calling' code that you are using, and if you are just calling this program or doing more before/after calling the program. I'm assuming you have a lot of comps that you are running this on and a .bat file would not be preferable but I would interested to see if start path\program.exe in a .bat/cmd line would give the same error.
    – Cand3r
    Dec 15, 2015 at 15:34
  • @Cand3r I wish i could post the code but I don't have it. I just have the install they provide us. I'll try the bat file. Give me a few..
    – MatthewD
    Dec 15, 2015 at 15:41
  • I get the same issue with a batch file.
    – MatthewD
    Dec 15, 2015 at 15:44
  • But a batch file that calls the desktop link works. Giving me the idea to just call the link instead of the exe. But that does not explain what is going on.
    – MatthewD
    Dec 15, 2015 at 15:45
  • Hmmm, yea if you can call the link with Autoit at least you will get what you want. I have no idea why calling a shortcut would be any different than the exe, unless the shortcut is still linking to the old exe? That log file makes me think that maybe the Autoit code needs to be updated("Main No inner exception") and something with the cannot create ActiveX component maybe Windows update
    – Cand3r
    Dec 15, 2015 at 16:15


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.