Re: Re: schtasks




Have you type schtasks /?

I was simple suggesting that you use the following


/U username Specifies the user context under
which the command should execute.

/P password Specifies the password for the given
user context.

/RU username Specifies the user account (user
context) under which the task runs.
For the system account, valid values
are "", "NT AUTHORITY\SYSTEM" or
"SYSTEM".

/RP password Specifies the password for the user.
To prompt for the password, the value
must be either "*" or none.
Password will not effect for the
system account.

Where /U is an account with permission to create the schedule and /RU is the RunAs account for the task.


On Mon, 10 Oct 2005 17:05:11 +0100, "Kok Yong Lee" <lkoky@xxxxxxxxxxx> wrote:

>Hi Jerold,
>
>by adding "U Fred /P password" to the schtasks run ... command ; I get the
>following error
>
>ERROR: Multiple connections to a server or shared resource by the same user,
>using more than one user name, are not allo
>wed. Disconnect all previous connections to the server or shared resource
>and try again..
>
>
>on the machine I issued this command I was login as Joe (not Fred), will
>this be the problem?
>
>
>"Jerold Schulman" <Jerry@xxxxxxxxxx> wrote in message
>news:qrmkk1prc8ckq98vmq98n9l4ldhr746gfl@xxxxxxxxxx
>> On Mon, 10 Oct 2005 11:57:08 +0100, "Kok Yong Lee" <lkoky@xxxxxxxxxxx>
>> wrote:
>>
>>>Hi there,
>>>
>>>I used to have to use Remote Desktop to login to various test machine and
>>>run a batch file to start a test.
>>>
>>>but since I discover the schtasks command, now I can use a simple batch
>>>file
>>>like below from my machine to kick start the test on various machines.
>>>However I also discovered that if the remote machines were already login
>>>then the running the following batch file does nothing at all. By login I
>>>mean one either goto the remote machine physically login and leave or
>>>login
>>>via Remote Desktop and end the session (without logoff from it).
>>>
>>>Any ideas why this behaviour?
>>>
>>>
>>>
>>>----------
>>>@echo off
>>>set machines=^
>>> CAMASM2 ^
>>> CAMASM3 ^
>>> CAMASM4 ^
>>> CAMASM5 ^
>>>
>>>REM
>>>REM Fisrt make sure there is such a schedule task on the remote mahcine
>>>REM
>>>for %%i in (%machines%) do (
>>> schtasks /query /s %%i | findstr /i /c:"asmversiontest" 1>nul
>>> if ERRORLEVEL 1 (
>>> echo %%i does not have schedule task
>>> schtasks /create /s %%i /tn ASMDebugTest /tr
>>>"z:\scripts\asmversiontest.bat" /sc once /st 06:00:00
>>> ) else (
>>> echo %%i has schedule task
>>> )
>>> schtasks /run /s %%i /tn ASMVersionTest
>>>)
>>>
>>
>> Using the following syntax, I cannot recreate your experience. It works
>> for me.
>>
>> schtasks /Create /S \\JSI009 /U JSIINC\Jerry /P password /RU Administrator
>> /RP password /SC ONLOGON /TN DefragD /TR C:\UTIL\DefragD.bat
>>
>> Jerold Schulman
>> Windows Server MVP
>> JSI, Inc.
>> http://www.jsiinc.com
>> http://www.jsifaq.com
>

Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
http://www.jsifaq.com
.



Relevant Pages

  • Re: how to substitute the remote login menu for the regular login text box in CDE.
    ... secondary and i type at the login prompt user1 for example, ... >> I want to disable the remote login and force the user to login through ... > you need to install ssh on the local machine and the remote machine. ... > make sure this xsession script is executable or it wont work. ...
    (comp.unix.solaris)
  • Re: Cant Remotely Record after MSN Remote Record Program Update
    ... If you attempt to schedule a recording and it says, "Failed, will keep trying", it will still fail and never show up. ... Your Media Center PC Program Guide might be ... Even though I'm using my remote TiVo scheduling functionality now, ... I have a dialog going on with MSN over this, at this time, and I'll add some screen shots to the communication chain. ...
    (microsoft.public.windows.mediacenter)
  • Re: Cant Remotely Record after MSN Remote Record Program Update
    ... I'm on the East Coast. ... If you attempt to schedule a recording and it says, "Failed, will keep trying", it will still fail and never show up. ... Your Media Center PC Program Guide might be ... Even though I'm using my remote TiVo scheduling functionality now, ...
    (microsoft.public.windows.mediacenter)
  • Re: Terminal Services Setup/Flaw
    ... This still allows everyone to hit the TS Server but denies the login to ... Terminal Server with this user and then .rdp into another server on the ... I found the Remote ...
    (microsoft.public.windows.terminal_services)
  • RE: Auto Logoff
    ... I understand that you want to force logoff ... remote user before run backup. ... How To Schedule Tasks in Windows XP ... Microsoft CSS Online Newsgroup Support ...
    (microsoft.public.windows.server.sbs)