Coozie - Tuesday, January 15, 2019 11:19 AM
You said you wanted to spawn the process as a different user and then hardcoded it with no explanation. With that, I thought you were actually going to do such a thing. And, no... I can't imagine anyone actually doing such a thing and, yet, they do.
As for the actual topic, yes... I have an idea... why are you trying to get information about the computer using T-SQL. Why not just make a WMIC call? Also, why write something like this? Why not just buy an existing product the would not only identify such things but also provide you with the ability to monitor the servers for other things? Of course, you'll also take some exception to those questions because your post hasn't provided anyone with enough information to actually know what the end game here is and so I'm just guessing based on what I see in the code.
.
--Jeff Moden
Change is inevitable... Change for the better is not.