Solved

Run Batch File without being logged in

Posted on 2012-04-10
19
883 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
  • 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
 
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
Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

 
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 19

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 19

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

Promote certifications in your email signature

Has your company recently won an award or achieved a certification? They'll no doubt want to show it off. Email signature images used to promote certifications & awards can instantly establish credibility with a recipient and provide you with numerous benefits.

Join & Write a Comment

The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now