Sign in to follow this  
Followers 0
sieurcoug

How to run a script as XP current user and not as NetworkService ?

3 posts in this topic

Hello,

I want to schedule an Autoit exe file launch.

So I used the "at" dos command line to execute my program :

c:\> at  16:13   /interactive /next:    28   D:\myfile.exe

But the problem is that myfile.exe is launched with the SYSTEM (NetworkService) user context.

Thus loosing my Firefox and Thunderbird profiles.

I searched on this forum and tried the RunAsSet command, without success.

Do you know how to :

  • either set the user environnement (Unix-like "su -") to my current logged-in username ?
  • or either easily schedule myfile.exe ?
Thanks a lot for your help !

Share this post


Link to post
Share on other sites



  • or either easily schedule myfile.exe ?

What about using the Scheduled Tasks wizard? Start > All Programs > Accessories > System Tools > Scheduled Tasks.

A few screens in you'll get a prompt for user/login name, if you want to specify one.

It's not as handy as the command line, but it works.

-S


(Yet Another) ExcelCOM UDF"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly...[indent]...specialization is for insects." - R. A. Heinlein[/indent]

Share this post


Link to post
Share on other sites

use the system environnement variables to get the current username

then pass the credentials with runas


-- Arck System _ Soon -- Ideas make everything

"La critique est facile, l'art est difficile"

Projects :

[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list]

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  
Followers 0