Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

"They ought to make butt-flavored cat food." --Gallagher


devel / comp.os.ms-windows.programmer.win32 / WTSSendMessageA "access is denied"

SubjectAuthor
* WTSSendMessageA "access is denied"T
`* WTSSendMessageA "access is denied"R.Wieser
 `- WTSSendMessageA "access is denied"T

1
WTSSendMessageA "access is denied"

<tl9umf$369j9$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=1148&group=comp.os.ms-windows.programmer.win32#1148

  copy link   Newsgroups: comp.os.ms-windows.programmer.win32
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: T@invalid.invalid (T)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: WTSSendMessageA "access is denied"
Date: Fri, 18 Nov 2022 22:56:15 -0800
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <tl9umf$369j9$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 19 Nov 2022 06:56:16 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="e0721d9ede8cfff905f47bed27bcff85";
logging-data="3352169"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18FkKEnmz9rNTYxkks1V2kmTCO/PUaM3jQ="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.4.0
Cancel-Lock: sha1:xs4htJ+WyY1kZAmcglRSUpHKzAE=
Content-Language: en-US
 by: T - Sat, 19 Nov 2022 06:56 UTC

Hi All,

Windows Chromebook Edition (W11-Pro 22H2)

https://learn.microsoft.com/en-us/windows/win32/api/wtsapi32/nf-wtsapi32-wtssendmessagea

Rudy probably knows this one off the top of his head.

I have a weird one trying to use WTSSendMessageA. It
works perfectly from the command line as both
user and Administrator.

WTSSendMessageA(
$Handle,
$SessionId,
$pTitle,
$TitleLength,
$pMessage,
$MessageLength,
$Style,
$Timeout,
$pResponse,
$bWait );

But when I try to run it from the Task Scheduler
as Administrator, I get back: error 5 (GetLastError),
"Access is Denied" (nf-winbase-formatmessagew)

https://ibb.co/9nR9pcc

And to add insult to injury, The pop up you see
from ibb comes from a DLL a guy at M$ wrote me.
And that one works in Task Scheduler. AAAAHHHHHH!!!!

$Handle = WTS_CURRENT_SERVER_HANDLE;
$bWait = 1;

Yours in frustration,
-T

Re: WTSSendMessageA "access is denied"

<tla4fj$684$1@gioia.aioe.org>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=1150&group=comp.os.ms-windows.programmer.win32#1150

  copy link   Newsgroups: comp.os.ms-windows.programmer.win32
Path: i2pn2.org!i2pn.org!aioe.org!XakcSTEO51npqVb7OVl71w.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: Re: WTSSendMessageA "access is denied"
Date: Sat, 19 Nov 2022 09:34:52 +0100
Organization: Aioe.org NNTP Server
Lines: 37
Message-ID: <tla4fj$684$1@gioia.aioe.org>
References: <tl9umf$369j9$1@dont-email.me>
Injection-Info: gioia.aioe.org; logging-data="6404"; posting-host="XakcSTEO51npqVb7OVl71w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Priority: 3
X-MSMail-Priority: Normal
X-Notice: Filtered by postfilter v. 0.9.2
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
 by: R.Wieser - Sat, 19 Nov 2022 08:34 UTC

T,

> https://learn.microsoft.com/en-us/windows/win32/api/wtsapi32/nf-wtsapi32-wtssendmessagea
>
> Rudy probably knows this one off the top of his head.

:-) Thanks for the confidence in me, but I'm afraid I know very little
about RDP in general.

> But when I try to run it from the Task Scheduler
> as Administrator, I get back: error 5 (GetLastError),
> "Access is Denied" (nf-winbase-formatmessagew)
....
> And to add insult to injury, The pop up you see
> from ibb comes from a DLL a guy at M$ wrote me.
> And that one works in Task Scheduler. AAAAHHHHHH!!!!

I read that as : I've got a program thats started by a remote task scheduler
which tries to open a message box at my end and fails, but I do get a
messagebox (showing the results of my failed attempt) when I use the M$ guys
DLL for it."

In that case my assumption is that that DLL does some more work than just
calling WTSSendMessage. Perhaps wrapping the call in a creation and
teardown of an actual RDP session (WTSVirtualChannelOpen and -close) ?

That the program works when you start it directly could be because the
environment for a program started thru the task scheduler is a bit different
from when its started by you in person. It by default not being
interactive is one of them.

Hope that helps.

Regards,
Rudy Wieser

Re: WTSSendMessageA "access is denied"

<tla5no$36mns$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=1151&group=comp.os.ms-windows.programmer.win32#1151

  copy link   Newsgroups: comp.os.ms-windows.programmer.win32
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: T@invalid.invalid (T)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: Re: WTSSendMessageA "access is denied"
Date: Sat, 19 Nov 2022 00:56:23 -0800
Organization: A noiseless patient Spider
Lines: 43
Message-ID: <tla5no$36mns$1@dont-email.me>
References: <tl9umf$369j9$1@dont-email.me> <tla4fj$684$1@gioia.aioe.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 19 Nov 2022 08:56:24 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="e0721d9ede8cfff905f47bed27bcff85";
logging-data="3365628"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19JDJLiaIPZjBdNcYoonAbE+PgKjL0vsaM="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.4.0
Cancel-Lock: sha1:xPrOuQQjsRiRd+7Q00D1XQmqVE8=
Content-Language: en-US
In-Reply-To: <tla4fj$684$1@gioia.aioe.org>
 by: T - Sat, 19 Nov 2022 08:56 UTC

On 11/19/22 00:34, R.Wieser wrote:
> T,
>
>> https://learn.microsoft.com/en-us/windows/win32/api/wtsapi32/nf-wtsapi32-wtssendmessagea
>>
>> Rudy probably knows this one off the top of his head.
>
> :-) Thanks for the confidence in me, but I'm afraid I know very little
> about RDP in general.

But, But, But, You know all and see all!!!!

>
>> But when I try to run it from the Task Scheduler
>> as Administrator, I get back: error 5 (GetLastError),
>> "Access is Denied" (nf-winbase-formatmessagew)
> ...
>> And to add insult to injury, The pop up you see
>> from ibb comes from a DLL a guy at M$ wrote me.
>> And that one works in Task Scheduler. AAAAHHHHHH!!!!
>
> I read that as : I've got a program thats started by a remote task scheduler
> which tries to open a message box at my end and fails, but I do get a
> messagebox (showing the results of my failed attempt) when I use the M$ guys
> DLL for it."
>
> In that case my assumption is that that DLL does some more work than just
> calling WTSSendMessage. Perhaps wrapping the call in a creation and
> teardown of an actual RDP session (WTSVirtualChannelOpen and -close) ?
>
> That the program works when you start it directly could be because the
> environment for a program started thru the task scheduler is a bit different
> from when its started by you in person. It by default not being
> interactive is one of them.
>
> Hope that helps.
>
> Regards,
> Rudy Wieser
>
>

That is what I believe is happening.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor