Jump to content
Sign in to follow this  
oztom

Running User Interactive AutoIT script on remote PC

Recommended Posts

oztom

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 :idea:

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

Share this post


Link to post
Share on other sites
omikron48

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.

Share this post


Link to post
Share on other sites
oztom

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... :idea:

I'll give that a try!

Thanks

Tom

Share this post


Link to post
Share on other sites
LoWang

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 by LoWang

Share this post


Link to post
Share on other sites
omikron48

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?

Share this post


Link to post
Share on other sites
LoWang

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 :-\

Share this post


Link to post
Share on other sites
omikron48

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.

Share this post


Link to post
Share on other sites
DW1

Maybe set it up to run in the registry? RunOnce under LocalMachine?

Share this post


Link to post
Share on other sites
omikron48

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?

Share this post


Link to post
Share on other sites
LoWang

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 :idea: 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 by LoWang

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×