Solved

Run Batch File without being logged in

Posted on 2012-04-10
19
899 Views
Last Modified: 2012-04-29
We took over a client that is running windows server 2008 and has some batch files running nightly processes from their vendor software.  In order to run these batch files, you have to be logged in to the server.  Even if we have the options checked to run whether user is logged in and we set the username and password.  We spoke with the vendor and they stated that you have to be logged in to the server to run the batch file.  So, my question, does anybody know a piece of software that would emulate the server being logged in without us actually having to leave it logged in?  For obvious reasons, I don't want to leave the server logged in all the time.  Thanks for your help in advance.
0
Comment
Question by:jruskey
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 4
  • 2
  • +3
19 Comments
 
LVL 17

Expert Comment

by:Anuroopsundd
ID: 37830990
you can schedule the batch file in task scheduler. pass the username and password in the wizard by which it should run...
you do not require to logon if the task is scheduled through task schedular.
0
 
LVL 7

Expert Comment

by:robertark
ID: 37830991
The task has to run under a username. Pick one. Afterwards, check the account rights (in security policy) and ensure the "logon as batch" is enabled (see: http://www.brooksnet.com/faq/117-02.html)

Next, create a task that runs the batch with the options "Run whether user is logged in or not" and "Run with highest privileges"
0
 
LVL 1

Author Comment

by:jruskey
ID: 37830992
I already told you we have done that and it doesn't work and the vendor states it won't work.
0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
LVL 4

Expert Comment

by:ltsweb
ID: 37830993
Have you tried the built-in Windows Task Scheduler?  That allows you to launch a program under a user's credentials.  It is great to schedule batch files, server restarts, and launch applications.

Regards!
0
 
LVL 1

Author Comment

by:jruskey
ID: 37830996
LTSWEB - If you are talking about task scheduler, yes.  That is what doesn't work and what the vendor states won't work.  That is why we are looking for another solution.
0
 
LVL 7

Expert Comment

by:robertark
ID: 37830997
jruskey: are the servers on a domain? If so, check the domain security policy for overrides.
0
 
LVL 1

Author Comment

by:jruskey
ID: 37831000
Let me make this clear - It does not work in task scheduler.  We have verified this with the vendors.
0
 
LVL 17

Expert Comment

by:Anuroopsundd
ID: 37831004
Ok. it seems that this is a problem with the application design as your vendor is also saying. in worst case you can do a RDP to the server with this username and just disconnect to lock the account... so the user is logged in...
0
 
LVL 1

Author Comment

by:jruskey
ID: 37831005
I agree that it is not ideal and I wish I could have the vendor fix that.  However, I can't.  With the RDP, that is fine in most cases.  However, a server reboot would reset this. Also, we have term server on this server and have it log out idle and disconnected sessions, so it isn't a viable solution
0
 
LVL 4

Expert Comment

by:ltsweb
ID: 37831019
Ok, sorry, I think something was delayed in EE.  When I posted, there were no comments or responses.

Task Scheduler is designed to run applications in a user session, so if that doesn't work try:

1) dedicated workstation that runs app and you keep it locked
2) virtual workstation/server

I assume the vendor would know if there is a work around for their code.  If they don't have an answer, then there is likely not one.

We have an app that runs on a dedicated server b/c it too can't run as a service or inside Task Scheduler.  The users know that when the credit cards don't go through or their  reports don't run, they have to log in and run the batch files.

Good Luck!
0
 
LVL 37

Expert Comment

by:Neil Russell
ID: 37831262
How often does it run?
You could have a scheduled task on ANOTHER server that opens an RDP session to the server where it NEEDS to run, has stored credentials so it logs on automatically without the need for a password, has the task you require to run listed in the STARTUP for this user account and the last thing in that task is to logoff.

Easy :D
0
 
LVL 1

Author Comment

by:jruskey
ID: 37832336
How would I accomplish the automatic rdp?
0
 
LVL 17

Assisted Solution

by:Anuroopsundd
Anuroopsundd earned 166 total points
ID: 37832393
0
 
LVL 17

Expert Comment

by:Anuroopsundd
ID: 37832396
this should solve the problem.....
http://www.donkz.nl/
0
 
LVL 20

Assisted Solution

by:compdigit44
compdigit44 earned 334 total points
ID: 37834347
We use System Scheduler to run batch jobs as you are and it has never failed us... http://www.splinterware.com/products/wincron.htm
0
 
LVL 1

Author Comment

by:jruskey
ID: 37834572
Do you run the professional version or free version?
0
 
LVL 1

Author Comment

by:jruskey
ID: 37837632
compdigit - I can't get the system scheduler to log the server in at a certain time.  Is it because it is a virtual server?
0
 
LVL 20

Accepted Solution

by:
compdigit44 earned 334 total points
ID: 37838465
I use the professional edition.  Another option which is free is to download the RunAsSPC program http://robotronic.de/runasspcEn.html then create a batch file that will reference the runasspc program and the other program that you need to run at a given time
0
 
LVL 1

Author Comment

by:jruskey
ID: 37839270
Do you schedule it to log into the PC Automaticall?
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to install and use the NTBackup utility that comes with Windows Server.
Determining the an SCCM package name from the Package ID
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question