From: Raghuveer on
There is a Way to run a Batch file without any 3rd party tools in Windows Server 2003/2008/2010 on System Start Up

Initially Place the required Batch file in a folder

1 . Open IIS (from run (type) inetmgr)

2 . Here under Default website create a Virtual Directory

3 . And point the Virtual directory location to the Folder where the batch file is available

4 . And finish the creation of the virtual directory

5 . Restart the System



As we know that IIS is a part of Windows Management Services , and we created Batch file in a folder which is a part of IIS , and on every system start we will have the IIS running which in turn runs the Batch file at the back end .

I hope this solution might solve many of the people requirements .




Matta wrote:

Re: batch file schedule fails on windows server 2003
02-Apr-07

On Apr 2, 12:18 pm, "Pegasus \(MVP\)" <I...(a)fly.com> wrote:

Sorry, that was my mistake.. with reference to your message I did set
the user to Logon as batch job and after some time when I check once
again it shows nothing.. it that.. hence once again I posted the
latest information....

Previous Posts In This Thread:

On Friday, March 30, 2007 12:38 AM
Matta wrote:

batch file schedule fails on windows server 2003
Hi,

I am scheduling a batch file to start in the midnight (11pm) for
backup operation. When I come and see in the next morning the schedule
is a fail.

The log file says following :
--------------------------------------------------
"bkup.job" (bkup.bat) 3/29/2007 11:00:00 PM ** ERROR **
The attempt to log on to the account associated with the task failed,
therefore, the task did not run.
The specific error is:
0x80070569: Logon failure: the user has not been granted the
requested logon type at this computer.
Verify that the task's Run-as name and password are valid and try
again.
----------------------------------------------------

I am running the schedule as Administrator and correct password is
set.

Another observation, here if I schedule the task in next couple of
hours it works fine,
i.e. In the morning at 10 AM if I schedule the task to start at 11AM
it works fine.

Can anyone tell me why this is happening...

Thanks,
Matta

On Friday, March 30, 2007 2:54 AM
Pegasus \(MVP\) wrote:

Re: batch file schedule fails on windows server 2003
"Matta" <mattasrinivas(a)gmail.com> wrote in message
news:1175233135.527003.52200(a)p77g2000hsh.googlegroups.com...

Create a dedicated account and give it sufficient privileges to access
the folders to be backed up. Now set the policy so that this account
can log on as a batch job, then schedule the backup job to run under
this dedicated account.

For testing purposes I would also create a job that is scheduled to
run every five minutes, under the same account, executing the batch
file below. When your backup job fails, does the test job fail too?
@echo off
echo %date% %time% >> c:\test.log

On Friday, March 30, 2007 3:48 AM
Matta wrote:

Re: batch file schedule fails on windows server 2003
On Mar 30, 12:54 pm, "Pegasus \(MVP\)" <I...(a)fly.com> wrote:

hi,
Thanks for the info...
Created a dedicated account and added it as member of administrator
and backup operators groups.
How can I set the account to log on as a batch job, what is the
process?

Thanks
Matta

On Friday, March 30, 2007 9:00 AM
Pegasus \(MVP\) wrote:

Re: batch file schedule fails on windows server 2003
Local Computer Policy / Computer Configuration / Windows Settings /
Security Settings / Local Policy / User Rights / Logon as a batch job.

On Monday, April 02, 2007 12:28 AM
Matta wrote:

Re: batch file schedule fails on windows server 2003
On Mar 30, 7:00 pm, "Pegasus \(MVP\)" <I...(a)fly.com> wrote:

Hi,

After adding the user to Logon as a batch job, I am still seeing the
same error:

"backup.job" (vssbkup.bat) 4/2/2007 1:00:00 AM ** ERROR **
The attempt to log on to the account associated with the task failed,
therefore, the task did not run.
The specific error is:
0x80070569: Logon failure: the user has not been granted the requested
logon type at this computer.
Verify that the task's Run-as name and password are valid and try
again.

Regards,
Matta

On Monday, April 02, 2007 2:31 AM
Matta wrote:

Re: batch file schedule fails on windows server 2003
Matta wrote:

Sorry, When I try to add the user to Logon as batch job and clikc
apply, I am seeing following message:

---------------------------
Security Templates
---------------------------
Access is denied.

Failed to save \\adm.key.com\sysvol\adm.key.com\Policies
\{31B2F340-016D-11D2-945F-00C04FB984F9}\Machine\Microsoft\Windows NT
\SecEdit\GptTmpl.inf. Make sure that you have the right permissions to
this object.

---------------------------
OK
---------------------------

Any clues why I am getting this message?

Thanks
Matta

On Monday, April 02, 2007 3:18 AM
Pegasus \(MVP\) wrote:

Re: batch file schedule fails on windows server 2003
"Matta" <mattasrinivas(a)gmail.com> wrote in message
news:1175495480.037196.231350(a)p77g2000hsh.googlegroups.com...
schedule
failed,
try
is
of
11AM
access
nt
under
to
batch
too?
job.- Hide quoted text -

Either you are not a domain administrator when you do this,
or else you have a problem with domain policies (about which
I am not well qualified to talk).

I am somewhat concerned about the accuracy of your reporting.
Two hours ago you wrote "After adding the user to Logon as
a batch job . . " whereas now you report that you were unable
to set the batch logon right for this user. The two statements
are clearly contradictory.

On Monday, April 02, 2007 7:50 AM
Matta wrote:

Re: batch file schedule fails on windows server 2003
On Apr 2, 12:18 pm, "Pegasus \(MVP\)" <I...(a)fly.com> wrote:

Sorry, that was my mistake.. with reference to your message I did set
the user to Logon as batch job and after some time when I check once
again it shows nothing.. it that.. hence once again I posted the
latest information....


Submitted via EggHeadCafe - Software Developer Portal of Choice
MSChart For VB.Net
http://www.eggheadcafe.com/tutorials/aspnet/45729dc8-c102-4dc6-9aa7-4f6246763650/mschart-for-vbnet.aspx