Greetings. What I am trying to do doesn’t sound to far out of the realm of possibility, though I might need different tools to do it.
We have application servers with apps that run on them constantly, not as services but within the context of a permanently logged in user, I’ll just call him "BOT."
What I am trying to do is to get FinalBuilder to do the following:
1-Shut down some of these apps remotely (from build server)
2-unregister dlls
3-copy new dlls
4-re-register dlls
5-Restart the apps in the context of "BOT"
I know that 1 and 3 are happening correctly, am not sure about 2 and 4, but 5 is not happening in that the apps get launched, but they are not visible to “BOT” while he is logged in. I see them in the process list, but not on the desktop.
I am currently using the WMI Execute process. I have tried the following:
1- Calling the app directly.
2- Calling a batch file that starts the app
3- Calling a batch file that calls a vbs script that starts the app.
All of these will start the app and display it on the desktop from the logged in session on the remote machine, but when called from FinalBuilder remotely I see nothing.
Is this possible with the WMI process?
I have done some research and see that I could probably use PSExec to do it with the /i switch, but I would just like to know if I am missing something before I try a new route. Also I can’t test it because my 30 day eval expired today.
Thanks for any feedback,
Owen
Hi Owen,
At the moment there is no way to use WMI Run Process to connect a GUI application to a login session. The problem is that whatever process you run via WMI does not automatically receive information about the logged in users’ desktop context (this includes any processes which it spawns.) I’ll put this on the to-do list for a future version.
You are correct that running PsExec with the /i switch will do this perfectly, and that is the solution I would recommend for now. There is a PSTools action package (written by Peter Thornquist) available on the Community Downloads page (Action Package category), or alternatively you can just use the Execute Program action.
As for registering and unregistering DLLs on a remote computer, you should be able to do this by running regsvr32.exe from WMI Run Process, and specifying the /s (silent) flag.
Please let us know if you have any more issues.
Regards,
Angus
When I looked at the changes for FinalBuilder version 5 I saw this:
WMI Run Process
Now allow process to be visible to logged in user's desktop
Was I mistaken in believing this applied to ANY server- not just the server you are running the project on? I had been working with PSExec just fine, but switched to version 5 when I saw this, and now I changed my project and it doesn't work. I mean I am now using a WMI process, but on the remote machine the process is still hidden.
Hi Owen,
I think that note may have been a mistake, sorry. The change was probably in the new psexec action and was mis-attributed to the WMI Run Process action.
The PsExec action should do what you need. I’ll fix the “What’s New” list to correct the situation.
Regards,
Angus