|
server
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Suppress confirmation prompts2008? 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?
Show quote
Hide quote
"fan" <donotre***@hotmail.com> wrote in message Let's have a look at the your batch file!news:OWnQAGk1JHA.5684@TK2MSFTNGP04.phx.gbl... > 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? 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 Show quoteHide quote "Pegasus [MVP]" <n***@microsoft.com> wrote in message news:uHWLOyk1JHA.6004@TK2MSFTNGP02.phx.gbl... > > "fan" <donotre***@hotmail.com> wrote in message > news:OWnQAGk1JHA.5684@TK2MSFTNGP04.phx.gbl... >> 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! > 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. Show quoteHide quote "fan" <donotre***@hotmail.com> wrote in message news:uMPTK9k1JHA.4468@TK2MSFTNGP05.phx.gbl... > 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]" <n***@microsoft.com> wrote in message > news:uHWLOyk1JHA.6004@TK2MSFTNGP02.phx.gbl... >> >> "fan" <donotre***@hotmail.com> wrote in message >> news:OWnQAGk1JHA.5684@TK2MSFTNGP04.phx.gbl... >>> 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! >> I take it you don't know, so rather than answer the question, you ask
another. Thanks anyway. Show quoteHide quote "Pegasus [MVP]" <n***@microsoft.com> wrote in message news:u7cry$k1JHA.6132@TK2MSFTNGP04.phx.gbl... > 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" <donotre***@hotmail.com> wrote in message > news:uMPTK9k1JHA.4468@TK2MSFTNGP05.phx.gbl... >> 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]" <n***@microsoft.com> wrote in message >> news:uHWLOyk1JHA.6004@TK2MSFTNGP02.phx.gbl... >>> >>> "fan" <donotre***@hotmail.com> wrote in message >>> news:OWnQAGk1JHA.5684@TK2MSFTNGP04.phx.gbl... >>>> 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! >>> > > "fan" <donotre***@hotmail.com> wrote in message I pointed out that your elaborate command syntax adds some unnecessary news:uYjrs7g2JHA.5276@TK2MSFTNGP04.phx.gbl... >I take it you don't know, so rather than answer the question, you ask >another. > > Thanks anyway. 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.
Stop windows service copy data and then start service
How to pass parameter from a file (txt/dll) to vbs code ANN: EditVar/EditV32/EditV64 and Choose/Choose32/Choose64 v2.0 batch file to split multiple text files in half. Set Local Computer Description Use VBScript to Set Local Computer Description Inventory script question How do implement this wildcard? Logon script help Get computer name as variable to use in vbs script. |
|||||||||||||||||||||||