|
server
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Command line parameters?I have a boot floppy for booting my computer to connect to the network so I can run Ghost and image my machine. I wrote a little batch file called logoff.bat for loging off the network when I'm finished. Logoff.bat contains: @net stop When it runs it prompts me for three different responses: Stopping the NETBEUI service also stops these services: REQUESTER Do you want to continue this operation? (Y/N) [Y]: You are currently logged on as Me. Do you want to log off? (Y/N) [N]: Continuing will cancel these connections: G: \\myserver\myshare Do you want to continue this operation? (Y/N) [N]: I answer Y to all three of these and it logs me out. Question is, is there a way to pass these key strokes through so I don't have to hit them? I know, just being lazy. But I would like to do this, will save me some time. I tried: a:\logoff Y Y Y a:\logoff < logoff.txt Where logoff.txt contains: Y Y Y Neither worked. Any other suggestions? Thanks in advance, Linn
Show quote
Hide quote
"Linn Kubler" <lkub***@chartwellwisc2.com> wrote in message the NET command does not seem to accept redirected input, but looks to the news:OudKLfLfJHA.3668@TK2MSFTNGP03.phx.gbl... > Hi, > > I have a boot floppy for booting my computer to connect to the network so > I can run Ghost and image my machine. I wrote a little batch file called > logoff.bat for loging off the network when I'm finished. > > Logoff.bat contains: > @net stop > > When it runs it prompts me for three different responses: > Stopping the NETBEUI service also stops these services: > REQUESTER > Do you want to continue this operation? (Y/N) [Y]: > You are currently logged on as Me. > Do you want to log off? (Y/N) [N]: > Continuing will cancel these connections: > G: \\myserver\myshare > Do you want to continue this operation? (Y/N) [N]: > > I answer Y to all three of these and it logs me out. > > Question is, is there a way to pass these key strokes through so I don't > have to hit them? I know, just being lazy. But I would like to do this, > will save me some time. > > I tried: > a:\logoff Y Y Y > a:\logoff < logoff.txt > > Where logoff.txt contains: > Y > Y > Y > > Neither worked. Any other suggestions? actual console. You could try running your batch file as a scheduled task to see if NET will assume what you want. Most likely, however, I'd expect it to just hang. Alternately, you could script the actions you want performed, and write your script to interact in whatever way makes sense. What is it that you want to have happen after the logoff? If you are going to reboot anyway, you could simply modify your .bat file to execute one of the availalble "reboot" utilities. /Al
Show quote
Hide quote
"Linn Kubler" <lkub***@chartwellwisc2.com> wrote in message the NET command does not seem to accept redirected input, but looks to the news:OudKLfLfJHA.3668@TK2MSFTNGP03.phx.gbl... > Hi, > > I have a boot floppy for booting my computer to connect to the network so > I can run Ghost and image my machine. I wrote a little batch file called > logoff.bat for loging off the network when I'm finished. > > Logoff.bat contains: > @net stop > > When it runs it prompts me for three different responses: > Stopping the NETBEUI service also stops these services: > REQUESTER > Do you want to continue this operation? (Y/N) [Y]: > You are currently logged on as Me. > Do you want to log off? (Y/N) [N]: > Continuing will cancel these connections: > G: \\myserver\myshare > Do you want to continue this operation? (Y/N) [N]: > > I answer Y to all three of these and it logs me out. > > Question is, is there a way to pass these key strokes through so I don't > have to hit them? I know, just being lazy. But I would like to do this, > will save me some time. > > I tried: > a:\logoff Y Y Y > a:\logoff < logoff.txt > > Where logoff.txt contains: > Y > Y > Y > > Neither worked. Any other suggestions? actual console. You could try running your batch file as a scheduled task to see if NET will assume what you want. Most likely, however, I'd expect it to just hang. Alternately, you could script the actions you want performed, and write your script to interact in whatever way makes sense. What is it that you want to have happen after the logoff? If you are going to reboot anyway, you could simply modify your .bat file to execute one of the availalble "reboot" utilities. /Al
Show quote
Hide quote
"Al Dunbar" <aland***@hotmail.com> wrote in message Yeah, that's what I suspected you'd say, that NET doesn't accept input like news:em1ByqLfJHA.3904@TK2MSFTNGP02.phx.gbl... > > "Linn Kubler" <lkub***@chartwellwisc2.com> wrote in message > news:OudKLfLfJHA.3668@TK2MSFTNGP03.phx.gbl... >> Hi, >> >> I have a boot floppy for booting my computer to connect to the network so >> I can run Ghost and image my machine. I wrote a little batch file called >> logoff.bat for loging off the network when I'm finished. >> >> Logoff.bat contains: >> @net stop >> >> When it runs it prompts me for three different responses: >> Stopping the NETBEUI service also stops these services: >> REQUESTER >> Do you want to continue this operation? (Y/N) [Y]: >> You are currently logged on as Me. >> Do you want to log off? (Y/N) [N]: >> Continuing will cancel these connections: >> G: \\myserver\myshare >> Do you want to continue this operation? (Y/N) [N]: >> >> I answer Y to all three of these and it logs me out. >> >> Question is, is there a way to pass these key strokes through so I don't >> have to hit them? I know, just being lazy. But I would like to do this, >> will save me some time. >> >> I tried: >> a:\logoff Y Y Y >> a:\logoff < logoff.txt >> >> Where logoff.txt contains: >> Y >> Y >> Y >> >> Neither worked. Any other suggestions? > > the NET command does not seem to accept redirected input, but looks to the > actual console. You could try running your batch file as a scheduled task > to see if NET will assume what you want. Most likely, however, I'd expect > it to just hang. > > Alternately, you could script the actions you want performed, and write > your script to interact in whatever way makes sense. > > What is it that you want to have happen after the logoff? If you are going > to reboot anyway, you could simply modify your .bat file to execute one of > the availalble "reboot" utilities. > > /Al > this. I always prefer to logout of a system once I have logged in, just seems the proper way to interact with systems. It's not that big of a deal and I don't actually use this more than a few times a year, just thought it would be nice to not to have to be bothered by it. Thanks and thanks for responding so quickly, Linn "Linn Kubler" <lkub***@chartwellwisc2.com> wrote in message <snip>news:uKRwO0LfJHA.1172@TK2MSFTNGP05.phx.gbl... > > "Al Dunbar" <aland***@hotmail.com> wrote in message > news:em1ByqLfJHA.3904@TK2MSFTNGP02.phx.gbl... >> >> "Linn Kubler" <lkub***@chartwellwisc2.com> wrote in message >> news:OudKLfLfJHA.3668@TK2MSFTNGP03.phx.gbl... >> What is it that you want to have happen after the logoff? If you are A few issues...>> going to reboot anyway, you could simply modify your .bat file to execute >> one of the availalble "reboot" utilities. >> >> /Al >> > Yeah, that's what I suspected you'd say, that NET doesn't accept input > like this. I always prefer to logout of a system once I have logged in, > just seems the proper way to interact with systems. It's not that big of > a deal and I don't actually use this more than a few times a year, just > thought it would be nice to not to have to be bothered by it. - First is that I expect that most of the shutdown/reboot utilities effectively do an implicit logout. - Second is that if you have logged in with a boot disk in order to re-image your computer, you are not really logged in in the same way that you are when you logon to your domain. If you are manually logging out from this session, the new image is not yet activated. If you have booted from a floppy, the only sense in which you are "logged in" is that you have established connections with network resources such as file shares. From that point of view, I suspect you are the only entity involved that sees a difference between logging out and simply terminating share connections. I'm pretty sure it's all the same to the servers and your network. And the instance of the O/S installed on the workstation is a non-issue, as it has not been booted. Or perhaps your environment is radically different from mine. /Al
Show quote
Hide quote
"Linn Kubler" <lkub***@chartwellwisc2.com> wrote in message What operating system do you have on your boot floppy? DOS 7?news:OudKLfLfJHA.3668@TK2MSFTNGP03.phx.gbl... > Hi, > > I have a boot floppy for booting my computer to connect to the network so > I can run Ghost and image my machine. I wrote a little batch file called > logoff.bat for loging off the network when I'm finished. > > Logoff.bat contains: > @net stop > > When it runs it prompts me for three different responses: > Stopping the NETBEUI service also stops these services: > REQUESTER > Do you want to continue this operation? (Y/N) [Y]: > You are currently logged on as Me. > Do you want to log off? (Y/N) [N]: > Continuing will cancel these connections: > G: \\myserver\myshare > Do you want to continue this operation? (Y/N) [N]: > > I answer Y to all three of these and it logs me out. > > Question is, is there a way to pass these key strokes through so I don't > have to hit them? I know, just being lazy. But I would like to do this, > will save me some time. > > I tried: > a:\logoff Y Y Y > a:\logoff < logoff.txt > > Where logoff.txt contains: > Y > Y > Y > > Neither worked. Any other suggestions? > > Thanks in advance, > Linn
Show quote
Hide quote
"Pegasus (MVP)" <I.***@fly.com.oz> wrote in message It's PC DOS Version 7.1 Rev. 0news:egzJ7%23LfJHA.3668@TK2MSFTNGP03.phx.gbl... > > "Linn Kubler" <lkub***@chartwellwisc2.com> wrote in message > news:OudKLfLfJHA.3668@TK2MSFTNGP03.phx.gbl... >> Hi, >> >> I have a boot floppy for booting my computer to connect to the network so >> I can run Ghost and image my machine. I wrote a little batch file called >> logoff.bat for loging off the network when I'm finished. >> >> Logoff.bat contains: >> @net stop >> >> When it runs it prompts me for three different responses: >> Stopping the NETBEUI service also stops these services: >> REQUESTER >> Do you want to continue this operation? (Y/N) [Y]: >> You are currently logged on as Me. >> Do you want to log off? (Y/N) [N]: >> Continuing will cancel these connections: >> G: \\myserver\myshare >> Do you want to continue this operation? (Y/N) [N]: >> >> I answer Y to all three of these and it logs me out. >> >> Question is, is there a way to pass these key strokes through so I don't >> have to hit them? I know, just being lazy. But I would like to do this, >> will save me some time. >> >> I tried: >> a:\logoff Y Y Y >> a:\logoff < logoff.txt >> >> Where logoff.txt contains: >> Y >> Y >> Y >> >> Neither worked. Any other suggestions? >> >> Thanks in advance, >> Linn > > What operating system do you have on your boot floppy? DOS 7? "Linn Kubler" <lkub***@chartwellwisc2.com> wrote in message It's quite a few years since I played with my DOS network boot disks and news:uN78BqWfJHA.3728@TK2MSFTNGP06.phx.gbl... > >> What operating system do you have on your boot floppy? DOS 7? > It's PC DOS Version 7.1 Rev. 0 they have fallen somewhat into disrepair. Since you use this facility rarely, it would probably take me more time to work out an answer than it takes you to respond to the chain of prompts over a couple of years . . . I therefore won't persist.
Show quote
Hide quote
"Linn Kubler" <lkub***@chartwellwisc2.com> wrote in message Try thisnews:OudKLfLfJHA.3668@TK2MSFTNGP03.phx.gbl... > Hi, > > I have a boot floppy for booting my computer to connect to the network so > I can run Ghost and image my machine. I wrote a little batch file called > logoff.bat for loging off the network when I'm finished. > > Logoff.bat contains: > @net stop > > When it runs it prompts me for three different responses: > Stopping the NETBEUI service also stops these services: > REQUESTER > Do you want to continue this operation? (Y/N) [Y]: > You are currently logged on as Me. > Do you want to log off? (Y/N) [N]: > Continuing will cancel these connections: > G: \\myserver\myshare > Do you want to continue this operation? (Y/N) [N]: > > I answer Y to all three of these and it logs me out. > > Question is, is there a way to pass these key strokes through so I don't > have to hit them? I know, just being lazy. But I would like to do this, > will save me some time. > > I tried: > a:\logoff Y Y Y > a:\logoff < logoff.txt > > Where logoff.txt contains: > Y > Y > Y > > Neither worked. Any other suggestions? > > Thanks in advance, > Linn > > - Create a text file with your responses... your logoff.txt file looks good, make sure there is a carriage return after that last "y" - instead of executing a:\logoff us type logoff.txt | logoff This will pipe the response file as input into the logoff program. Tom
Show quote
Hide quote
"Tom_Slycke" <tom_sl***@cox.net> wrote in message he didn't just execute "A:\logoff", he redirected his reponse file into it news:5z0fl.4214$E%6.3459@newsfe04.iad... > > "Linn Kubler" <lkub***@chartwellwisc2.com> wrote in message > news:OudKLfLfJHA.3668@TK2MSFTNGP03.phx.gbl... >> Hi, >> >> I have a boot floppy for booting my computer to connect to the network so >> I can run Ghost and image my machine. I wrote a little batch file called >> logoff.bat for loging off the network when I'm finished. >> >> Logoff.bat contains: >> @net stop >> >> When it runs it prompts me for three different responses: >> Stopping the NETBEUI service also stops these services: >> REQUESTER >> Do you want to continue this operation? (Y/N) [Y]: >> You are currently logged on as Me. >> Do you want to log off? (Y/N) [N]: >> Continuing will cancel these connections: >> G: \\myserver\myshare >> Do you want to continue this operation? (Y/N) [N]: >> >> I answer Y to all three of these and it logs me out. >> >> Question is, is there a way to pass these key strokes through so I don't >> have to hit them? I know, just being lazy. But I would like to do this, >> will save me some time. >> >> I tried: >> a:\logoff Y Y Y >> a:\logoff < logoff.txt >> >> Where logoff.txt contains: >> Y >> Y >> Y >> >> Neither worked. Any other suggestions? >> >> Thanks in advance, >> Linn >> >> > > Try this > - Create a text file with your responses... your logoff.txt file looks > good, make sure there is a carriage return after that last "y" > - instead of executing a:\logoff using redirection > us If the executable were actually reading its input from stdin, redirection > type logoff.txt | logoff > > This will pipe the response file as input into the logoff program. and piping would both work. Since it appears to not be reading from stdin, then neither will work. /Al
Show quote
Hide quote
"Al Dunbar" <aland***@hotmail.com> wrote in message oopps... point takennews:eNsdi9wfJHA.3708@TK2MSFTNGP04.phx.gbl... > > "Tom_Slycke" <tom_sl***@cox.net> wrote in message > news:5z0fl.4214$E%6.3459@newsfe04.iad... >> >> "Linn Kubler" <lkub***@chartwellwisc2.com> wrote in message >> news:OudKLfLfJHA.3668@TK2MSFTNGP03.phx.gbl... >>> Hi, >>> >>> I have a boot floppy for booting my computer to connect to the network >>> so I can run Ghost and image my machine. I wrote a little batch file >>> called logoff.bat for loging off the network when I'm finished. >>> >>> Logoff.bat contains: >>> @net stop >>> >>> When it runs it prompts me for three different responses: >>> Stopping the NETBEUI service also stops these services: >>> REQUESTER >>> Do you want to continue this operation? (Y/N) [Y]: >>> You are currently logged on as Me. >>> Do you want to log off? (Y/N) [N]: >>> Continuing will cancel these connections: >>> G: \\myserver\myshare >>> Do you want to continue this operation? (Y/N) [N]: >>> >>> I answer Y to all three of these and it logs me out. >>> >>> Question is, is there a way to pass these key strokes through so I don't >>> have to hit them? I know, just being lazy. But I would like to do >>> this, will save me some time. >>> >>> I tried: >>> a:\logoff Y Y Y >>> a:\logoff < logoff.txt >>> >>> Where logoff.txt contains: >>> Y >>> Y >>> Y >>> >>> Neither worked. Any other suggestions? >>> >>> Thanks in advance, >>> Linn >>> >>> >> >> Try this >> - Create a text file with your responses... your logoff.txt file looks >> good, make sure there is a carriage return after that last "y" >> - instead of executing a:\logoff > > he didn't just execute "A:\logoff", he redirected his reponse file into it > using redirection > >> us >> type logoff.txt | logoff >> >> This will pipe the response file as input into the logoff program. > > If the executable were actually reading its input from stdin, redirection > and piping would both work. Since it appears to not be reading from stdin, > then neither will work. > > /Al > >
Continued xcopy script
Get attributes of user list from AD xcopy errorlevel problem in script File monitoring run once script Monitor redundent processes running on the Windows Server Batch file to delete files dynamically Help with VBscript powershell storage management Bulldog (Need help with script downloaded from script center) |
|||||||||||||||||||||||