Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Run Batch File without being logged in

Posted on 2012-04-10
19
Medium Priority
?
911 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 498 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 1002 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 1002 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

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Question has a verified solution.

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

This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
Resolving an irritating Remote Desktop connection that stops your saved credentials from being used.
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

670 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