oztom Posted April 23, 2010 Share Posted April 23, 2010 I've been using AutoIT successfully to upgrade the PC's on my network with Patches etc using a startup script. This work rather well, the users get prompted if they want to install or postpone the latest updates before they get to Windows login. So far so good. Now I'd like to use AutoIT to prompt users on my network for administrative action, whilst logged on. Not too much, that would be annoying obviously However, if I display a dialogue using "at" or "psexec" the AutoIT executable doesn't get run as the local user and they therefore can't see the dialogue. I'm still very fresh with AutoIT, can you point me in the right direction/thread? Thx Tom Link to comment Share on other sites More sharing options...
omikron48 Posted April 23, 2010 Share Posted April 23, 2010 You have to set it so that the script runs interactively with the console session. With psexec, I think it was 0 for XP and 1 for Vista and above. I'm not that sure if I remember correctly so you'd better check up on it. As for at, it's the '/interactive' parameter. Link to comment Share on other sites More sharing options...
oztom Posted April 24, 2010 Author Share Posted April 24, 2010 You have to set it so that the script runs interactively with the console session.With psexec, I think it was 0 for XP and 1 for Vista and above. I'm not that sure if I remember correctly so you'd better check up on it.As for at, it's the '/interactive' parameter.Yes, I never thought about the parameters like that.There indeed is a /i switch for "psexec" and and and /interactive switch for "at"Sounds like this an easy fix... I'll give that a try!ThanksTom Link to comment Share on other sites More sharing options...
LoWang Posted May 5, 2010 Share Posted May 5, 2010 (edited) Hello and is there any other way to do this? I have a script which is launched by Tivoli software on a target machine with a domain user logged on it (similar to psexec -i). It runs under local admin and can display windows to logged user. It checks some settings and it may decide, that restart is needed to continue, so I want it to set itself somehow to run after computer restarts. Unfortunatelly scheduled task created by schtasks set "onlogon" is visible only for the user under which it is running! I could use AT command to set it to run at currenttime+1minute /interactive, but it woulr run under SYSTEM and that causes problems especially when it tries to access network... Any suggestions? Edited May 5, 2010 by LoWang Link to comment Share on other sites More sharing options...
omikron48 Posted May 5, 2010 Share Posted May 5, 2010 Doesn't schtasks have a /IT paramater for run interactive? In your case, I'd guess you'd need to set /RU to the specific domain user you want, maybe? Link to comment Share on other sites More sharing options...
LoWang Posted May 6, 2010 Share Posted May 6, 2010 Where did you get it? There is no such parameter. The thing is I need to run that script under admin rights to be able to install something, but I want to display some messages to user...It seems it will not be that easy to do :-\ Link to comment Share on other sites More sharing options...
omikron48 Posted May 7, 2010 Share Posted May 7, 2010 Whoops. Apparently that flag is only available for schtasks in the server edition. Even then, it's only for restricting a scheduled task to run when the /RU user is logged in. Link to comment Share on other sites More sharing options...
DW1 Posted May 7, 2010 Share Posted May 7, 2010 Maybe set it up to run in the registry? RunOnce under LocalMachine? AutoIt3 Online Help Link to comment Share on other sites More sharing options...
omikron48 Posted May 7, 2010 Share Posted May 7, 2010 If my understanding is correct, I think the situation is an account with User level access will login, then the program will run under a different account with Admin privileges. If that is the case, RunOnce may not work if the credentials used is the User level account. What kind of problems are encountered when using the System account? Link to comment Share on other sites More sharing options...
LoWang Posted May 7, 2010 Share Posted May 7, 2010 (edited) I had a problem with scripts (or maybe it was service) running as SYSTEM as it was unable to access network, but now I am unable to reproduce it Maybe there was some settings which changed it... so if there is no other way I will use schtasks to schedule a task onlogon. This task will run and schedule another one with AT /interactive command which will be running as SYSTEM and finally visible for user Edited May 7, 2010 by LoWang 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