joeware - never stop exploring... :)

Information about joeware mixed with wild and crazy opinions...

Random mailbag question – CPAU returning data to the calling process

by @ 1:22 pm on 9/2/2008. Filed under tech

Got this in the inbox…

Hi Joe,

Thanks great tool. One quick question, I’m using CPAU to run a vbscript under a different user id however I was wonder if there was an easy way to pass parameters back to the calling application without having to give the “runas” account a lot of local access on the workstation. I am trying to call a script that has rights to a SQL DB with an NT account instead of a SQL account then pass back a few values it has read to the calling program, as the user context the original program has has all the necessary rights to update registry etc as past of the machine logon process.

I hope this all makes sense 🙂

My response

If I understand what you are saying. You want to use CPAU to launch into an alternate security context which has rights to X but not to the local machine. Then you want CPAU to take info from X and hand back to a process that launched CPAU on the local machine.

You need some sort of passing mechanism. There is nothing in CPAU that can do it. It can’t track what is going on in the app that it launches, it just fires the process and knows whether or not it did that. If you need to pass information back to the calling machine, you need a mechanism for it. The process you launch could do several different forms of IPC (interprocess communication) but it is up to do to do it. That IPC could take the form of something simple like writing a text file or could be something as complex as using IPC Network methods like named pipes, IP sockets, shared mapped memory, etc. Regardless CPAU won’t facilitate that for you.

   joe

Rating 3.00 out of 5

Comments are closed.

[joeware – never stop exploring… :) is proudly powered by WordPress.]