E
E
Eugene2020-12-10 12:51:59
cmd/bat
Eugene, 2020-12-10 12:51:59

How can I send a MsgBox to a specific user from a domain?

Colleagues, good afternoon!

The task arose under a certain condition to send notifications by MsgBox to a user who fell under the condition filter at a specified interval.

I got to the moment of getting the user and working out the condition, but with the specified MsgBox, it's understandable, it crashes on my screen, is there any solution ?? I've already broken my brain.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
E
Eugene, 2020-12-10
@xslipfanx

Having rummaged and studied a couple of articles and interesting topics in the forum, I realized that it is possible to invent a kind of crutch. Why a crutch? Perhaps, I will be beaten with one stick for such a decision, and the second for being annoying to the user, based on the recommendation of a colleague above that users should work calmly, and this is blasphemy. But management has so far decided to send notifications. And so the essence of the crutch:
VBS is such an interesting thing that if you run the script on behalf of the domain admin (according to the ethics of local admins on the server, we still turn it off), then the script can only read the processes of the entire server, or on a specifically running session.
In order for the script to work as we need - remove the connected users, then remove the copies of the program clients running from them, you need to run CMD from under the SYSTEM user. THIS really works .. A crutch, you say, but it only works like that ... it's funny)) there are enough ways. And so we compile from CMD the launch of a program that compiles the launch of CMD from under the SYSTEM user (some kind of incomprehensible nonsense).
Then we run the script in the line and it works as it should.
Crutch No. 2 - launch from the cmd script with the command msg UserName "our message". UserName - a variable that is written to by a user who has launched more than n copies in his session..

Set WshShell = CreateObject("WScript.Shell")
WshShell.Run ("msg " & strNameOfUser & " Apocalypse is imminent!!!")

Colleagues, once again sorry for the blasphemy! There is a separate and working method for 1C, but it already works on a forced restriction. I have a task of an informative nature, so the solution embodied this ..

R
res2001, 2020-12-10
@res2001

There was a msg command in Windows, which was able to send messages on the network. I don't have it in Home, maybe Pro has it.

I
Iegan Amadeus, 2020-12-10
@iegan1011

Why are you insulting the user so much? It's not ethical when a pop-up flies right in your face.
At least send Pop-up's notifications. There is a whole powershell script on the network, as well as a whole library of bubl components - something there, but unofficial on github. The script supports sending a popup message to a remote server.

V
Vladimir Korotenko, 2020-12-10
@firedragon

The pro has
msg kvn "Vova cut it down"

B
BindOf, 2021-09-26
@BindOf

net send

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question