|
-
Oct 11th, 2000, 07:57 AM
#1
Thread Starter
Frenzied Member
I can i restart a computer within a vb program.
-
Oct 11th, 2000, 08:49 AM
#2
Junior Member
Code:
in a module:
Option Explicit
Public Declare Function ExitWindowsEx Lib "user32" (ByVal _ uFlags As Long, ByVal dwReserved As Long) As Long
Public Const EWX_SHUTDOWN = 1
Public Const EWX_LOGOFF = 0
Public Const EWX_REBOOT = 2
Public Const EWX_FORCE = 4
in a form:
Private Sub Command1_Click()
ExitWindowsEx EWX_REBOOT, 0
End Sub
-
Oct 26th, 2000, 03:19 PM
#3
Vb2000, is there anyway of logging out of a remote PC in VB? Or logging in for that matter?
-
Oct 26th, 2000, 07:55 PM
#4
What I'm looking for is to be able to pass the function a computer on the network and logoff that PC. For example, from Computer 'A' I want to log the user off Computer 'B'.
-
Oct 26th, 2000, 09:18 PM
#5
Fanatic Member
You would have to set up service on each computer on the network. Then, use the winsock control to allow a Client program to connect to the service and log him of
Use:
Code:
ExitWindowsEx (EWX_LOGOFF, 0)
GWDASH
[b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]
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
|