Running a script/job as if you're the logged on user
Hi everyone - I have a question about running an application on a machine as if I am the console user. There are two ways that this has been an issue for us.
One way; every month, we have a downtime scenario at our hospital. There is a small piece of software on many of our clients that monitors the availability of our EMR (electronic medical record) system. If someone closes the EMR, this program automatically re-opens it to a login prompt.
During downtimes, we have to stop this, because when the Citrix farm becomes unavailable, this program throws dozens of errors on the screen. SO, we push out a script that kills the process before the downtime begins, and this works great.
However, getting it to start back up is the challenge. I have a VBS script that simply calls the process, and it starts it back up. We were successful with it using our DS 6.9 environment and our 7.1 environment. But then we tested it again a few days later, and it wouldn't work. Finally realized that if the logged on user was a local admin, it would not work. If they were not an admin, it worked fine. I don't have that mixed up - it works when they're NOT an admin. The process shows up in Task manager, but it never fully starts up. I tried dropping the VB script and just calling the process with a batch file, but it has the same result.
The other scenario is with a VB script that modifies the print queues. It scans the existing print queues, compares them to the new print server queues, and creates new queues, deletes the old ones. Anyway, when you run it on the workstation manually, you get prompted for each queue it is going to create, and then you click OK for it to continue.
I need to call this script on Windows XP machines throughout the organization, and it must be run as the logged on user. WHen I call the script from Altiris, I see the process running, but the user never gets any prompts, and the queues are not modified. It eventually dies out on its own.
I have set the jobs to run as the logged on user in both scenarios.
Is there some other way that I can call the scripts?
Thanks for your help!