Moderators JLogan3o13 Posted February 25, 2010 Moderators Share Posted February 25, 2010 I have a question about running scripts on remote computers. I have a number of scripts for the uninstall of unapproved software. Most of this software is bloatware that cannot be uninstalled via msiexec (toolbars, freeware, etc.). So I script through the dialog boxes of the uninstall, and then delete any leftover files and reg entries afterward (locking out user interaction while the script is running). The scripts work fine on my local computer, and I can even drop them into the root of C: on a remote PC, and then create a RunOnce registry entry to run them at the next logon. However, I have been attempting to run them immediately by dropping the executable on the remote machine and then running a tool like psexec, or by running the AT command to create a scheduled task. Unfortunately, in either case, the UI does not come up when the script runs. I can see the script running under the Task Manager, but no windows come up and the script just hangs. I've tried running under different credentials, including SYSTEM, as well as running under different sessions (Windows, Console, etc.). Nothing seems to be working. Any suggestions would be greatly appreciated. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
omikron48 Posted February 25, 2010 Share Posted February 25, 2010 You need to use the session parameter in the case of psexec. Your script needs to interact with the console session so you can see program GUIs. I think it was 0 for XP and 1 for Vista and up. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted February 25, 2010 Author Moderators Share Posted February 25, 2010 Thanks, I tried using the session ID, but it still didn't work. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
AdamUL Posted February 25, 2010 Share Posted February 25, 2010 (edited) For PSEXEC, you need to use the -i option to allow the process to interact with the desktop. I have used beyondexec and psexec, they both have the same -i option, without any problems. Edited February 25, 2010 by AdamUL Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now