Sign in to follow this  
Followers 0
hankjrfan

Killing All Netwok Connections

8 posts in this topic

I am writing a script to back up files on my server. Does anyone know of away to drop all network connections so that I can be sure no one is useing any of the files before i back them up. Even a command line program should be fine.

I have tried useing "net sessions /delete" but it requires you to hit y and then enter and "echo y|net sessions /delete" does not work.

Any ideas/suggestions would be appreciated.

Share this post


Link to post
Share on other sites



ipconfig /release ?

Nice idea, but this machine has a static ip not dhcp.

Thanks anyway

Share this post


Link to post
Share on other sites

Net Stop Server

...

Net Start Server


[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

Share this post


Link to post
Share on other sites

Net Stop Server

...

Net Start Server

Thanks that seems to accomplice what I want. Any idea on how to send a "Y{ENTER}" to the command window. I have never tried it but I have always heard that autoit has a hard time reading a command window.

Share this post


Link to post
Share on other sites

maby the STD I/O functions from the beta can be off assistance ?

I will check it out. Right now I am not useing the beta.

Thanks

Share this post


Link to post
Share on other sites

something like this?

Send("#r")
WinWaitActive("Run")
Send("cmd{Enter}")
WinWaitActive("C:\WINDOWS\system32\cmd.exe")
Send("y {Enter}")
Exit

It is really sad to see a family torn apart by something as simple as a pack of wolves.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0