Jump to content

Run without having needing to have a user logged on


Recommended Posts

There's Scheduled Tasks, run as a service, and remote execute by PSExec. All available through your friendly neighborhood search function!

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Hi:

The problem I'm having is that I have a script setup to run the exe file created using auto it. The script is setup to run using and account with the right permissions to run the exe file. What happens is the script runs, but the exe doesn't run until a user logs in to the machine.

Thanks

Steve

Link to comment
Share on other sites

How did you set it up for the target user, in their logon script or an HKCU reg key? That would be expected to run only when the user logs on.

Use a scheduled task configured to run as the appropriate user. Take a look at the SCHTASKS.EXE utility for setting it up.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Hi:

Here is the script that I run using altiris.

net use s: \\co48\wynn4nw$

cd..

cd\s:

s:\wynn4nw_setup.exe THIS IS THE AUTOIT EXE

cd..

md\util

copy \\coam4100g112-01\altiris$\SPED\Util\lsforcehost.reg c:\util

regedit /s c:\util\lsforcehost.reg

I have it use an account that has rights to map the share and has local admin rights.

Hope this helps

Thanks

again.

Steve

Link to comment
Share on other sites

Nothing in that batch file does any authentication or sets up any alternative credentials. That's the part we are interested in (if I understand the issue).

If you just want to run that batch file as another user then use SCHTASKS.EXE to set it up as a one-time task using that user's credentials. You might have to forgo mapping a drive letter in that environment and just use the UNC directly. If I recall correctly, you can only use local drive letters when not logged on.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Hi:

I use altiris to run the script on the computers , I can tell altiris to use this account to run the script.

Thanks

Steve

So altiris is running or scheduling the batch file? Sounds like all it does is schedule the task, which you could do for yourself with SCHTASKS.EXE.

Anyway, try it without the drive mapping:

\\co48\wynn4nw$\wynn4nw_setup.exe

C:
cd \
md \util
copy \\coam4100g112-01\altiris$\SPED\Util\lsforcehost.reg c:\util
regedit /s c:\util\lsforcehost.reg

Of course, if your AuotIt script depends on the S: mapping, you'll have to tweak that too. Just use @ScriptDir instead.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...