Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Windows Server » microsoft.public.windows.server.scripting
Thread: logevent command bombs scheduled task

HTVi
TV Discussion Newsgroups

logevent command bombs scheduled task
Jen <jenlbenson[ at ]gmail.com> 4/24/2007 10:32:41 PM
I have a script that uses logevent. Logged in as my account the
script runs successfully, without errors, and writes to the event
log. When I attempt to run this batch file as a scheduled task, under
my SAME credentials, it fails with 0x1 error, which according to
microsoft means "An incorrect function was called or an unknown
function was called". If I rem out the logevent line the scheduled
task runs successfully.

The line bombing the scheduled task is:

c:\winnt\system32\logevent.exe -s I -r "ADExport.bat" -e 0 "ADExport
Started."

The same line runs from the command line successfully. Everyone has
read/execute perms on the logevent.exe file.

The box is a domain controller. Any ideas?

Re: logevent command bombs scheduled task
"Jeremy" <jeremy[ at ]discussions.microsoft.com> 4/25/2007 2:13:17 AM
Task scheduler simply returns the error code returned by the command it
runs. Sometimes programs return non-zero error codes when they have
actually done what you wanted. Is this the case? When you run the command
from a command line what do you get if you type: ECHO %ERRORLEVEL%
immediately afterwards?

"Jen" <jenlbenson[ at ]gmail.com> wrote in message
news:1177453961.790799.131200[ at ]t39g2000prd.googlegroups.com...
[Quoted Text]
>I have a script that uses logevent. Logged in as my account the
> script runs successfully, without errors, and writes to the event
> log. When I attempt to run this batch file as a scheduled task, under
> my SAME credentials, it fails with 0x1 error, which according to
> microsoft means "An incorrect function was called or an unknown
> function was called". If I rem out the logevent line the scheduled
> task runs successfully.
>
> The line bombing the scheduled task is:
>
> c:\winnt\system32\logevent.exe -s I -r "ADExport.bat" -e 0 "ADExport
> Started."
>
> The same line runs from the command line successfully. Everyone has
> read/execute perms on the logevent.exe file.
>
> The box is a domain controller. Any ideas?
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen