Alaska Software Inc. - Problem with "nested" Runshell
Username: Password:
AuthorTopic: Problem with "nested" Runshell
Ricardo CayssialsProblem with "nested" Runshell
on Fri, 20 Jan 2023 15:50:29 +0100
Hello guys.

I have a problem with Runshell (alaska xbase 1.9). 

"Program1.exe" uses Runshell to execute "Program2.exe" which transforms a file 
xxxx.html, and everything works fine when "Program1.exe" is executed from the 
command line or from my Win 7 desktop.

I also have "Program0.exe", a general menu used to launch different programs, 
one of which is "Program1.exe". When "Program0.exe" executes "Program1.exe" 
through Runshell(), then "Program2.exe" shows a message of not allowed access 
to file xxxx.html.

In other words:
"Program1.exe" -> RunShell("Program2.exe") = works fine and I get xxxx.html 
transformed

"Program0.exe" -> RunShell("Program1.exe") -> Runshell("Program2.exe") = fails 

Both alternatives run with the same user/pass credentials (as administrator) 
but it seems that the second call to Runshell loses the credentials or 
something like that.

I tried with many different sintaxes for Runshell():
RunShell("/C Program2.exe xxxx.html")
RunShell("xxxx.html","Program2.exe",.f.,.t.)
RunShell("/C start Program2.exe xxxx.html")
and always get the same result.

Is there something I'm missing about system configuration or environment?

Thank you very much.
Ricardo
Ricardo Cayssialsnotifications
on Fri, 20 Jan 2023 15:52:06 +0100
Tim CallahanRe: Problem with "nested" Runshell
on Tue, 24 Jan 2023 08:11:10 -0800
On Fri, 20 Jan 2023 15:50:29 +0100, Ricardo Cayssials wrote:

>Hello guys.
>
>I have a problem with Runshell (alaska xbase 1.9). 
>
>"Program1.exe" uses Runshell to execute "Program2.exe" which transforms a file 
>xxxx.html, and everything works fine when "Program1.exe" is executed from the 
>command line or from my Win 7 desktop.
>
>I also have "Program0.exe", a general menu used to launch different programs, 
>one of which is "Program1.exe". When "Program0.exe" executes "Program1.exe" 
>through Runshell(), then "Program2.exe" shows a message of not allowed access 
>to file xxxx.html.
>
>In other words:
>"Program1.exe" -> RunShell("Program2.exe") = works fine and I get xxxx.html 
>transformed
>
>"Program0.exe" -> RunShell("Program1.exe") -> Runshell("Program2.exe") = fails 
>
>Both alternatives run with the same user/pass credentials (as administrator) 
>but it seems that the second call to Runshell loses the credentials or 
>something like that.
>
>I tried with many different sintaxes for Runshell():
>RunShell("/C Program2.exe xxxx.html")
>RunShell("xxxx.html","Program2.exe",.f.,.t.)
>RunShell("/C start Program2.exe xxxx.html")
>and always get the same result.
>
>Is there something I'm missing about system configuration or environment?
>
>Thank you very much.
>Ricardo

Is program1.exe accessing the HTML file and not closing it before
calling program2.exe?
Ricardo CayssialsRe: Problem with "nested" Runshell
on Wed, 25 Jan 2023 22:20:08 +0100
Tim Callahan wrote in message 
news:an00th1cgmp8con7ldo73g5mian84tpt1t@4ax.com...
>On Fri, 20 Jan 2023 15:50:29 +0100, Ricardo Cayssials wrote:
>
>>Hello guys.
>>
>>I have a problem with Runshell (alaska xbase 1.9). 
>>
>>"Program1.exe" uses Runshell to execute "Program2.exe" which transforms a 
file 
>>xxxx.html, and everything works fine when "Program1.exe" is executed from 
the 
>>command line or from my Win 7 desktop.
>>
>>I also have "Program0.exe", a general menu used to launch different 
programs, 
>>one of which is "Program1.exe". When "Program0.exe" executes "Program1.exe" 
>>through Runshell(), then "Program2.exe" shows a message of not allowed 
access 
>>to file xxxx.html.
>>
>>In other words:
>>"Program1.exe" -> RunShell("Program2.exe") = works fine and I get xxxx.html 
>>transformed
>>
>>"Program0.exe" -> RunShell("Program1.exe") -> Runshell("Program2.exe") = 
fails 
>>
>>Both alternatives run with the same user/pass credentials (as administrator) 
>>but it seems that the second call to Runshell loses the credentials or 
>>something like that.
>>
>>I tried with many different sintaxes for Runshell():
>>RunShell("/C Program2.exe xxxx.html")
>>RunShell("xxxx.html","Program2.exe",.f.,.t.)
>>RunShell("/C start Program2.exe xxxx.html")
>>and always get the same result.
>>
>>Is there something I'm missing about system configuration or environment?
>>
>>Thank you very much.
>>Ricardo
>
>Is program1.exe accessing the HTML file and not closing it before
>calling program2.exe?

Hello Tim.
No, it is not. Nobody is accessing the HTML file, just Program2.exe.
I used "openfiles" to check that, just in case there was an open file handle.
Thank you.
Thomas BraunRe: Problem with "nested" Runshell
on Tue, 07 Feb 2023 16:32:20 +0100
Ricardo Cayssials wrote:
> 
> Hello Tim.
> No, it is not. Nobody is accessing the HTML file, just Program2.exe.
> I used "openfiles" to check that, just in case there was an open file handle.
> Thank you.

This might be caused by a ton of things, including antivirus software...

Can you provide a small sourcecode sample to illustrate/reproduce the
problem?

regards
thomas
Tim CallahanRe: Problem with "nested" Runshell
on Wed, 08 Feb 2023 12:55:09 -0800
On Tue, 07 Feb 2023 16:32:20 +0100, Thomas Braun wrote:

Disabling the AV software and testing it is a great idea. We actually
had an instance of AV software holding a file open, even when it
appeared we deleted it. Excluding this file's containing folder from
the AV software fixed the issue.

>Ricardo Cayssials wrote:
>> 
>> Hello Tim.
>> No, it is not. Nobody is accessing the HTML file, just Program2.exe.
>> I used "openfiles" to check that, just in case there was an open file handle.
>> Thank you.
>
>This might be caused by a ton of things, including antivirus software...
>
>Can you provide a small sourcecode sample to illustrate/reproduce the
>problem?
>
>regards
>thomas
Ricardo CayssialsRe: Problem with "nested" Runshell
on Tue, 21 Feb 2023 13:23:45 +0100
Tim Callahan wrote in message 
news:mu28uhh6tfkk2846ebn8eoe6tap40i7es1@4ax.com...
>On Tue, 07 Feb 2023 16:32:20 +0100, Thomas Braun wrote:
>
>Disabling the AV software and testing it is a great idea. We actually
>had an instance of AV software holding a file open, even when it
>appeared we deleted it. Excluding this file's containing folder from
>the AV software fixed the issue.
>
>>Ricardo Cayssials wrote:
>>> 
>>> Hello Tim.
>>> No, it is not. Nobody is accessing the HTML file, just Program2.exe.
>>> I used "openfiles" to check that, just in case there was an open file 
handle.
>>> Thank you.
>>
>>This might be caused by a ton of things, including antivirus software...
>>
>>Can you provide a small sourcecode sample to illustrate/reproduce the
>>problem?
>>
>>regards
>>thomas

Hello Tim.
The problem dissapeared when I was making a small sample to post. I guess 
avast antivirus had something to do with that, but I am not sure.
Thank you very much.
Regards
Ricardo
Ricardo CayssialsRe: Problem with "nested" Runshell
on Tue, 21 Feb 2023 13:21:02 +0100
Thomas Braun wrote in message 
news:1r2tfthkxxbgw$.7xytxjyews54$.dlg@40tude.net...
>Ricardo Cayssials wrote:
>> 
>> Hello Tim.
>> No, it is not. Nobody is accessing the HTML file, just Program2.exe.
>> I used "openfiles" to check that, just in case there was an open file 
handle.
>> Thank you.
>
>This might be caused by a ton of things, including antivirus software...
>
>Can you provide a small sourcecode sample to illustrate/reproduce the
>problem?
>
>regards
>thomas

Hello Thomas.
The problem dissapeared. I guess avast antivirus had something to do with 
that, but I am not sure.
Thank you very much.
Regards
Ricardo