|
-
July 19th, 2008, 04:10 AM
#1
[RESOLVED] help ( detect pc that is on and shutdown it)
Dear friends, I'm developing internt kiosk program. I'm using vb.net 2008 and windows vista sp1. Is there anyone know the code where we can see which computer that is already turn on?
Example the client is pc 1 until pc 10
and the ip adress of each is 192.168.0.1 until 192.168.0.10
can I know/view which computer that is already turn on from server form?
if can, what is the code?
can anyone help me?
One more thing, Can I shutdown the computer from server?
For example: It's already closing time and if we are turn off computer one by one. It'll takes time and not efficient. So, can I just turn off the client computer from server? If can, can you give me the code?
Thanks for your help.......
-
July 19th, 2008, 05:27 AM
#2
Re: help ( detect pc that is on and shutdown it)
You can ping the host you want to know if up with
http://msdn.microsoft.com/en-us/libr...tion.ping.aspx
If you are using tcp/ip client/server, then after you checked that client is up, you can send a string command like "Shutdown" or similar and when the client receives this, shutdown the pc.
I've read something similar before in
http://www.codeproject.com/KB/vb/RemoteShutdownX.aspx
Hope it helps
-
July 19th, 2008, 07:19 AM
#3
Re: help ( detect pc that is on and shutdown it)
-
July 19th, 2008, 03:51 PM
#4
Re: help ( detect pc that is on and shutdown it)
If you doing the Kiosk software you can implement everything within the app.. You already have the IP linkup, and can use this to check if the client system is still online, and then you can use the ShutDown API call in the client part ..
Gremmy..
Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
WPF Articles : 3D Animation 1 , 2 , 3
Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.
-
July 19th, 2008, 05:14 PM
#5
Re: help ( detect pc that is on and shutdown it)
I'd use Terminal Server for the kiosk's. It can connect and run software securely
-
July 19th, 2008, 06:39 PM
#6
Re: help ( detect pc that is on and shutdown it)
I like dglienna's suggestion for terminal servers.
This works very well, using the API to call the command:
Code:
Const SW_SHOWNORMAL As Int32 = 1
Private Declare Function apiWinExec Lib "kernel32" Alias "WinExec" (ByVal lpCmdLine As String, ByVal nCmdShow As Int32) As Int32
apiWinExec("tsshutdn /server:" & RemoteName.Text & " /powerdown", SW_SHOWNORMAL)
All you need to know is the name of the remote computer to shut down.
But I know that there are several ways to do it.
-
July 20th, 2008, 10:58 PM
#7
Re: help ( detect pc that is on and shutdown it)
 Originally Posted by TT(n)
I like dglienna's suggestion for terminal servers.
This works very well, using the API to call the command:
Code:
Const SW_SHOWNORMAL As Int32 = 1
Private Declare Function apiWinExec Lib "kernel32" Alias "WinExec" (ByVal lpCmdLine As String, ByVal nCmdShow As Int32) As Int32
apiWinExec("tsshutdn /server:" & RemoteName.Text & " /powerdown", SW_SHOWNORMAL)
All you need to know is the name of the remote computer to shut down.
But I know that there are several ways to do it.
Do we need to import anything in the vb.net (for example import system.data.oledb when we want to connect to Acsess database)?
Do The Remote Name is the computer Name ?
What about if we use the ip address, is the code will be the same???
-
July 20th, 2008, 11:21 PM
#8
Re: help ( detect pc that is on and shutdown it)
No
I don't think you'd need an import, if the computer shows up in the task "View workgroup computers", in the "My Network" window.
Yes
If a computer name/s is showing then, you can shut that computer down.
No
Use the computer name with this example.
Other examples suggested may use the ip address, and the port number.
-
July 20th, 2008, 11:48 PM
#9
Re: help ( detect pc that is on and shutdown it)
 Originally Posted by TT(n)
No
I don't think you'd need an import, if the computer shows up in the task "View workgroup computers", in the "My Network" window.
Yes
If a computer name/s is showing then, you can shut that computer down.
No
Use the computer name with this example.
Other examples suggested may use the ip address, and the port number.
Can you give example with the ip address and port number
Thanks for your help
-
July 21st, 2008, 02:57 PM
#10
Re: help ( detect pc that is on and shutdown it)
This link has already been posted.
Remote Shutdown
Please read the links that members have posted, when they try to answer your question.
-
July 21st, 2008, 05:46 PM
#11
Re: help ( detect pc that is on and shutdown it)
just replace the servername with the server ip address. you don't need to specify a port. i shut down my server that way.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|