Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Scripting > Suppress confirmation prompts

Reply
Thread Tools Display Modes

Suppress confirmation prompts

 
 
fan
Guest
Posts: n/a

 
      05-16-2009
Does anyone know how to suppress confirmation prompts for commands in Server
2008?

I have used logoff with the session ID in a script/batch since NT4 and MS
seems to have changes Server 2008 to require confirmation. more of that
don't run with scissors safety stuff in Vista

The message displayed is:

If you reset this session, all users using this protocol will be logged off,
Continue (n=no)?

I've tried all the tricks from the past and they seem to be masked.

One that works from the command line directly is the tried and true >nul,
however it doesn't work from within a .cmd

logoff 1 /server:MYFILESERVER /v >nul

Any clues?


 
Reply With Quote
 
 
 
 
Pegasus [MVP]
Guest
Posts: n/a

 
      05-16-2009

"fan" <> wrote in message
news:...
> Does anyone know how to suppress confirmation prompts for commands in
> Server 2008?
>
> I have used logoff with the session ID in a script/batch since NT4 and MS
> seems to have changes Server 2008 to require confirmation. more of that
> don't run with scissors safety stuff in Vista
>
> The message displayed is:
>
> If you reset this session, all users using this protocol will be logged
> off, Continue (n=no)?
>
> I've tried all the tricks from the past and they seem to be masked.
>
> One that works from the command line directly is the tried and true >nul,
> however it doesn't work from within a .cmd
>
> logoff 1 /server:MYFILESERVER /v >nul
>
> Any clues?


Let's have a look at the your batch file!


 
Reply With Quote
 
fan
Guest
Posts: n/a

 
      05-16-2009
Tried all the following. Some work some don't as far as the logoff operation
is concerned.

But no matter what, ALL will produce the prompt confirmation message,

If you reset this session, all users using this protocol will be logged
off, Continue (n=no)?

either halting execution of the script or at the end of the script, which
leaves a cmd open waiting for a user to confirm.



@echo on
rem cmd /q /c start logoff /server:cdvcxp01 3 <echo y
rem cmd /q /c start logoff /server:cdvcxp01 2 <echo y

rem cmd /q /c start logoff 2 /server:cdvcxp01 >nul
rem cmd /q /c start /i /b logoff 2 /server:cdvcxp01 >nul
rem cmd /q /c start /i /b logoff 1 /server:cdvcxp01 >nul

rem cmd /q /c start /i /b logoff 2 /server:cdvcxp01 >nul
rem cmd /q /c start /i /b logoff 1 /server:cdvcxp01 >nul

rem start /i /b logoff 3 /server:cdvcxp01 >nul
rem start /i /b logoff 2 /server:cdvcxp01 >nul
rem start /i /b logoff 1 /server:cdvcxp01 >nul

rem start /i logoff 3 /server:cdvcxp01 >nul
rem start /i logoff 2 /server:cdvcxp01 >nul
rem start /i logoff 1 /server:cdvcxp01 >nul

rem start /i /b logoff 4 /server:cdvcxp01
rem start /i /b logoff 3 /server:cdvcxp01
rem start /i /b logoff 2 /server:cdvcxp01
rem start /i /b logoff 1 /server:cdvcxp01

start /i logoff 4 /server:cdvcxp01
start /i logoff 3 /server:cdvcxp01
start /i logoff 2 /server:cdvcxp01
start /i logoff 1 /server:cdvcxp01



"Pegasus [MVP]" <> wrote in message
news:...
>
> "fan" <> wrote in message
> news:...
>> Does anyone know how to suppress confirmation prompts for commands in
>> Server 2008?
>>
>> I have used logoff with the session ID in a script/batch since NT4 and MS
>> seems to have changes Server 2008 to require confirmation. more of that
>> don't run with scissors safety stuff in Vista
>>
>> The message displayed is:
>>
>> If you reset this session, all users using this protocol will be logged
>> off, Continue (n=no)?
>>
>> I've tried all the tricks from the past and they seem to be masked.
>>
>> One that works from the command line directly is the tried and true >nul,
>> however it doesn't work from within a .cmd
>>
>> logoff 1 /server:MYFILESERVER /v >nul
>>
>> Any clues?

>
> Let's have a look at the your batch file!
>

 
Reply With Quote
 
Pegasus [MVP]
Guest
Posts: n/a

 
      05-16-2009
Why do you use cmd.exe to invoke the Start command to run the logoff
command? Logoff.exe by itself would be quite sufficient!

@echo off
logoff /server:cdvcxp01 3

The above command works nicely on my Windows 2003 server. At the moment I
don't have a Windows 2008 server to test it on.


"fan" <> wrote in message
news:...
> Tried all the following. Some work some don't as far as the logoff
> operation is concerned.
>
> But no matter what, ALL will produce the prompt confirmation message,
>
> If you reset this session, all users using this protocol will be logged
> off, Continue (n=no)?
>
> either halting execution of the script or at the end of the script, which
> leaves a cmd open waiting for a user to confirm.
>
>
>
> @echo on
> rem cmd /q /c start logoff /server:cdvcxp01 3 <echo y
> rem cmd /q /c start logoff /server:cdvcxp01 2 <echo y
>
> rem cmd /q /c start logoff 2 /server:cdvcxp01 >nul
> rem cmd /q /c start /i /b logoff 2 /server:cdvcxp01 >nul
> rem cmd /q /c start /i /b logoff 1 /server:cdvcxp01 >nul
>
> rem cmd /q /c start /i /b logoff 2 /server:cdvcxp01 >nul
> rem cmd /q /c start /i /b logoff 1 /server:cdvcxp01 >nul
>
> rem start /i /b logoff 3 /server:cdvcxp01 >nul
> rem start /i /b logoff 2 /server:cdvcxp01 >nul
> rem start /i /b logoff 1 /server:cdvcxp01 >nul
>
> rem start /i logoff 3 /server:cdvcxp01 >nul
> rem start /i logoff 2 /server:cdvcxp01 >nul
> rem start /i logoff 1 /server:cdvcxp01 >nul
>
> rem start /i /b logoff 4 /server:cdvcxp01
> rem start /i /b logoff 3 /server:cdvcxp01
> rem start /i /b logoff 2 /server:cdvcxp01
> rem start /i /b logoff 1 /server:cdvcxp01
>
> start /i logoff 4 /server:cdvcxp01
> start /i logoff 3 /server:cdvcxp01
> start /i logoff 2 /server:cdvcxp01
> start /i logoff 1 /server:cdvcxp01
>
>
>
> "Pegasus [MVP]" <> wrote in message
> news:...
>>
>> "fan" <> wrote in message
>> news:...
>>> Does anyone know how to suppress confirmation prompts for commands in
>>> Server 2008?
>>>
>>> I have used logoff with the session ID in a script/batch since NT4 and
>>> MS seems to have changes Server 2008 to require confirmation. more of
>>> that don't run with scissors safety stuff in Vista
>>>
>>> The message displayed is:
>>>
>>> If you reset this session, all users using this protocol will be logged
>>> off, Continue (n=no)?
>>>
>>> I've tried all the tricks from the past and they seem to be masked.
>>>
>>> One that works from the command line directly is the tried and true
>>> >nul, however it doesn't work from within a .cmd
>>>
>>> logoff 1 /server:MYFILESERVER /v >nul
>>>
>>> Any clues?

>>
>> Let's have a look at the your batch file!
>>



 
Reply With Quote
 
fan
Guest
Posts: n/a

 
      05-21-2009
I take it you don't know, so rather than answer the question, you ask
another.

Thanks anyway.



"Pegasus [MVP]" <> wrote in message
news:u7cry$...
> Why do you use cmd.exe to invoke the Start command to run the logoff
> command? Logoff.exe by itself would be quite sufficient!
>
> @echo off
> logoff /server:cdvcxp01 3
>
> The above command works nicely on my Windows 2003 server. At the moment I
> don't have a Windows 2008 server to test it on.
>
>
> "fan" <> wrote in message
> news:...
>> Tried all the following. Some work some don't as far as the logoff
>> operation is concerned.
>>
>> But no matter what, ALL will produce the prompt confirmation message,
>>
>> If you reset this session, all users using this protocol will be logged
>> off, Continue (n=no)?
>>
>> either halting execution of the script or at the end of the script, which
>> leaves a cmd open waiting for a user to confirm.
>>
>>
>>
>> @echo on
>> rem cmd /q /c start logoff /server:cdvcxp01 3 <echo y
>> rem cmd /q /c start logoff /server:cdvcxp01 2 <echo y
>>
>> rem cmd /q /c start logoff 2 /server:cdvcxp01 >nul
>> rem cmd /q /c start /i /b logoff 2 /server:cdvcxp01 >nul
>> rem cmd /q /c start /i /b logoff 1 /server:cdvcxp01 >nul
>>
>> rem cmd /q /c start /i /b logoff 2 /server:cdvcxp01 >nul
>> rem cmd /q /c start /i /b logoff 1 /server:cdvcxp01 >nul
>>
>> rem start /i /b logoff 3 /server:cdvcxp01 >nul
>> rem start /i /b logoff 2 /server:cdvcxp01 >nul
>> rem start /i /b logoff 1 /server:cdvcxp01 >nul
>>
>> rem start /i logoff 3 /server:cdvcxp01 >nul
>> rem start /i logoff 2 /server:cdvcxp01 >nul
>> rem start /i logoff 1 /server:cdvcxp01 >nul
>>
>> rem start /i /b logoff 4 /server:cdvcxp01
>> rem start /i /b logoff 3 /server:cdvcxp01
>> rem start /i /b logoff 2 /server:cdvcxp01
>> rem start /i /b logoff 1 /server:cdvcxp01
>>
>> start /i logoff 4 /server:cdvcxp01
>> start /i logoff 3 /server:cdvcxp01
>> start /i logoff 2 /server:cdvcxp01
>> start /i logoff 1 /server:cdvcxp01
>>
>>
>>
>> "Pegasus [MVP]" <> wrote in message
>> news:...
>>>
>>> "fan" <> wrote in message
>>> news:...
>>>> Does anyone know how to suppress confirmation prompts for commands in
>>>> Server 2008?
>>>>
>>>> I have used logoff with the session ID in a script/batch since NT4 and
>>>> MS seems to have changes Server 2008 to require confirmation. more of
>>>> that don't run with scissors safety stuff in Vista
>>>>
>>>> The message displayed is:
>>>>
>>>> If you reset this session, all users using this protocol will be logged
>>>> off, Continue (n=no)?
>>>>
>>>> I've tried all the tricks from the past and they seem to be masked.
>>>>
>>>> One that works from the command line directly is the tried and true
>>>> >nul, however it doesn't work from within a .cmd
>>>>
>>>> logoff 1 /server:MYFILESERVER /v >nul
>>>>
>>>> Any clues?
>>>
>>> Let's have a look at the your batch file!
>>>

>
>

 
Reply With Quote
 
Pegasus [MVP]
Guest
Posts: n/a

 
      05-21-2009

"fan" <> wrote in message
news:...
>I take it you don't know, so rather than answer the question, you ask
>another.
>
> Thanks anyway.


I pointed out that your elaborate command syntax adds some unnecessary
complication to the task, which may well cause your problem. It's up to you
to decide if you wish to test the simplified syntax.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Suppress confirmation prompts fan Windows Server 5 05-21-2009 01:38 PM
suppress UDF, suppress Juliet oooyyy Windows Vista General Discussion 8 08-15-2008 02:59 AM
Prompts, prompts, and more prompts...jeez alex Windows Vista Administration 115 04-14-2008 06:28 PM
suppress cmd box goundhog Windows Server 0 09-28-2007 04:07 PM
HELP SUPPRESS IE7 eric Internet Explorer 5 02-02-2006 05:59 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59