- JOHN THOMAS
- PowerBuilder
- Tuesday, 11 August 2020 11:36 PM UTC
Greetings all - didn't see anything quite like this in the Q/A so far. We suddenly have a special problem when calling this .Net exe from new PB. This arrangement has been and is still working for 10+ years now on a Windows 2003/PB 12.5 combination, but we are now trying to run this in a much newer (Windows 2019) platform. I am finding, for one, that just about every app needs the "run as administrator" setting turned to be able to run them correctly. Whatever, the below is the PB code snip and the error we're getting:
====================
wsh = CREATE OleObject
li_rc = wsh.ConnectToNewObject( "WScript.Shell" )
ls_temp = lsExe + " ~"" + lljob +"~" ~"" + ldFrom + "~" ~"" + ldthru + "~" ~"" + lsRootFolder + "~" ~"" + lsDbServer + "~" ~"" + lsDbName + "~" ~"" + lsTempFolder + "~""
li_rc = wsh.Run(ls_temp, NORMAL, WAIT)
==========================
On the above call to Run() we are getting simply "error calling external object function RUN". That's all. All args composing the ls_temp var string have valid values, none null (we'd probably get the "null arguments" error if that were the case). Note that the .Net exe in lsExe runs fine when run standalone and I also have it set to "run as administrator" in the Compatibility tab (right mouse on file), so I'm hoping that our PB calling app is not running into that deficiency; it's not saying that it is anyway. The "Run()" function doesn't seem to have very many options for feedback. Anyway, we need a way out of this asap. Any help appreciated, thanks!
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.