I have a Win 2003 Server runnig the same script I was using On win 2000 Server.

This script is set to run as a local admin and will only execute if the
local admin is logged in.

I have made a small script just to test this and it exibits the same issues.
spin.vbs
For i = 1 to 100000
next

ST command line = c:\windows\system32\cscript.exe c:\temp\spin.vbs

when this executes and the local admin is logged in the SCH Task GUI status
indicates running while the script is spinning and the result = 0x0.

BUT when another admin is logged in and teh ST executes Status stayes
blank and result = 0x1.

Conduting the same test with notepad both cases show Status running then
result 0x0.

I am lost any thoughts, is there a Cscript switch i am missing.

--
thanks
CranDev :)

Re: VBS does not run in Schediled Task if user is not logged in runas by Steve

Steve
Tue Jan 25 21:34:01 CST 2005

By default, regular user accounts (non-admin accounts) cannot logon
interactively on a Windows 2003 server. What's happening is that the user
account you are using is not allowed to "log on" and hence can't run
anything. If you want to enable this, I assume you could modify your local
group policy on the server to permit that account to log on a batch job.

--
Steve Seguis - MCSE, MVP Windows Server, SCJP
SCRIPTMATION
Automating the Enterprise
http://www.scriptmation.com


"crandev" <crandev@discussions.microsoft.com> wrote in message
news:3F347D6B-AD20-4FC1-9B94-2F8F0AC87CC8@microsoft.com...
>I have a Win 2003 Server runnig the same script I was using On win 2000
>Server.
>
> This script is set to run as a local admin and will only execute if the
> local admin is logged in.
>
> I have made a small script just to test this and it exibits the same
> issues.
> spin.vbs
> For i = 1 to 100000
> next
>
> ST command line = c:\windows\system32\cscript.exe c:\temp\spin.vbs
>
> when this executes and the local admin is logged in the SCH Task GUI
> status
> indicates running while the script is spinning and the result = 0x0.
>
> BUT when another admin is logged in and teh ST executes Status stayes
> blank and result = 0x1.
>
> Conduting the same test with notepad both cases show Status running then
> result 0x0.
>
> I am lost any thoughts, is there a Cscript switch i am missing.
>
> --
> thanks
> CranDev :)



Re: VBS does not run in Schediled Task if user is not logged in ru by crandev

crandev
Wed Jan 26 06:39:04 CST 2005

Thank you
I am using an Admin Account and it has batch job rights. Also has rights to
act as part of the operating system. Note if I run Notepad in the same
manner or a bat file that just moves a file, everything works as expected.
It is just cscript.....

Also when I try to run cscript I get a UPHClean event in the event viewer.

Any thoughts;
Thank you

"Steve Seguis [MVP]" wrote:

> By default, regular user accounts (non-admin accounts) cannot logon
> interactively on a Windows 2003 server. What's happening is that the user
> account you are using is not allowed to "log on" and hence can't run
> anything. If you want to enable this, I assume you could modify your local
> group policy on the server to permit that account to log on a batch job.
>
> --
> Steve Seguis - MCSE, MVP Windows Server, SCJP
> SCRIPTMATION
> Automating the Enterprise
> http://www.scriptmation.com
>
>
> "crandev" <crandev@discussions.microsoft.com> wrote in message
> news:3F347D6B-AD20-4FC1-9B94-2F8F0AC87CC8@microsoft.com...
> >I have a Win 2003 Server runnig the same script I was using On win 2000
> >Server.
> >
> > This script is set to run as a local admin and will only execute if the
> > local admin is logged in.
> >
> > I have made a small script just to test this and it exibits the same
> > issues.
> > spin.vbs
> > For i = 1 to 100000
> > next
> >
> > ST command line = c:\windows\system32\cscript.exe c:\temp\spin.vbs
> >
> > when this executes and the local admin is logged in the SCH Task GUI
> > status
> > indicates running while the script is spinning and the result = 0x0.
> >
> > BUT when another admin is logged in and teh ST executes Status stayes
> > blank and result = 0x1.
> >
> > Conduting the same test with notepad both cases show Status running then
> > result 0x0.
> >
> > I am lost any thoughts, is there a Cscript switch i am missing.
> >
> > --
> > thanks
> > CranDev :)
>
>
>