Re: schtask to run task now or in 2 minutes

From: Clay Calvert (ccalvert_at_Wanguru.com)
Date: 12/23/04


Date: Wed, 22 Dec 2004 19:29:12 -0500

On Wed, 22 Dec 2004 07:13:02 -0800, "Greg"
<Greg@discussions.microsoft.com> wrote:

>Any one have any thoughts/suggestions regarding the below question?

The first thing that popped in my head was are there any 'special'
characters in the password, such as <>|*%?&.

What error did it give? You may have to put a pause at the end of the
batch file.

>"Dave Patrick" wrote:
>
>> You might want to ask this one in server.scripting
>>
>> forwarding to microsoft.public.windows.server.scripting
>>
>> --
>> Regards,
>>
>> Dave Patrick ....Please no email replies - reply in newsgroup.
>> Microsoft Certified Professional
>> Microsoft MVP [Windows]
>> http://www.microsoft.com/protect
>>
>> "Greg" wrote:
>> | Ok I got my task to schedule and to run using the following format...
>> |
>> | schtasks /create /tn prog-install /s %1 /u username /p password /tr
>> | "\\%1\C$\Temp\progin.BAT" /sc once /st 23:00:00
>> | schtasks /run /tn prog-install /s %1 /u username /p password
>> |
>> | As you can see above I had to imbed my username and password into each
>> line.
>> | Below I tried to use a set veriable for my password but this did not work
>> | even though I did set the veriables at the begining of the script. I have
>> | multiple sections of the batch file and don't want to have to put my
>> username
>> | and password all over the place. I'd like to just set two vaialbles in
>> the
>> | begining and "read" them when needed. Any ideas here?
>> |
>> | schtasks /create /tn prog-install /s %1 /u %UNAME /p %UNPW /tr
>> | "\\%1\C$\Temp\progin.BAT" /sc once /st 23:00:00
>> | schtasks /run /tn prog-install /s %1 /u %UNAME /p %UNPW
>> | ===========================================

Clay Calvert
CCalvert@Wanguru.com
Replace "W" with "L"



Relevant Pages

  • Re: schtask to run task now or in 2 minutes
    ... The first thing that popped in my head was are there any 'special' ... characters in the password, such as |*%?&. ... >> | As you can see above I had to imbed my username and password into each ... >> | multiple sections of the batch file and don't want to have to put my ...
    (microsoft.public.windows.server.scripting)
  • Re: Invalid characters for WTSQuerySessionInformation?
    ... code page different from Windows' default code page. ... We don't have to validate the username, ... I have discovered that Windows XP properly prevents characters such as ... WTSQuerySessionInformationW and WideCharToMultiByte.) ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Invalid characters for WTSQuerySessionInformation?
    ... and '/' from being used in a username. ... Characters such as '$' and '@' are problematic, ... (By the way this is with the Unicode version WTSQuerySessionInformationW. ... WTSQuerySessionInformationW and WideCharToMultiByte.) ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Invalid characters for WTSQuerySessionInformation?
    ... Characters such as '$' and '@' are problematic, for the reasons that we have discussed. ... But Windows XP permits these characters to be used in a username. ... As mentioned, WTSQuerySessionInformationA fails with quite a lot of characters, so I already made a workaround using WTSQuerySessionInformationW and WideCharToMultiByte.) ...
    (microsoft.public.win32.programmer.kernel)
  • Re: What is the maximal length of usernames on Solaris?
    ... I don't know but 8 characters ... People who whine about petty shit such as how long a username can be ... should just forget all about any *nix system and stick with Windows. ... > reasons that it's been so successful. ...
    (comp.sys.sun.admin)

Loading