|
Thank for posting, nice post. I have an example to follow:
I want to display the following information of a remote computer. The following information displayed when i input IP/Hostname then click a function to enumarate the information. I don't know how it process and how can i do that? (i mean the solution, the code and many more, 'cause i'm starting to research it). The result is display while using SuperScan to scan it (for more information please refer to it, i just want to develop an application like that).
The Enumaration Type of display is:
- NetBIOS Name Table
- NULL Session
- MAC Address
- Workstation Type
- Users
- Groups
- Account Policies
- Shares
- Domains
- Remote Time of Day
- Logon Sessions
- Drives
- Trusted Domains
- Services
=====================================================================
NetBIOS information on 192.168.2.13
5 names in table
HIEULN 00 UNIQUE Workstation service name
HIEULN 20 UNIQUE Server services name
WORKGROUP 00 GROUP Workstation service name
WORKGROUP 1E GROUP Group name
HIEULN 03 UNIQUE Messenger name
MAC address 0: 00:0D:60:35:B2:11
Attempting a NULL session connection on 192.168.2.13
NULL session successful to \\192.168.2.13\IPC$
MAC addresses on 192.168.2.13
MAC address 0: 00:00:00:00:00:00
\Device\NetbiosSmb
MAC address 1: 00:0D:60:35:B2:11
\Device\NetBT_Tcpip_{2D3783AA-F4A7-44BF-9776-3CE86BC1890C}
Workstation/server type on 192.168.2.13
Windows 2000
Workstation/Server Name : "192.168.2.13"
Platform ID : 500
Version : 5.0
Comment : ""
Type : 00011003
LAN Manager Workstation
LAN Manager Server
NT/2000 Workstation
Users on 192.168.2.13
Total Users: 8
--- 1 ---
User "a"
Full Name: "a"
System Comment: "a"
User Comment: ""
Last logon: Never
Password expires: Never
Password changed: Never
Locked out: No
Disabled: No
Number of logons: 0
Bad password count: 0
--- 2 ---
User "ACTUser"
Full Name: "Application Center Test Account"
System Comment: "Account used to launch the Application Center Test Broker and Controller services"
User Comment: ""
Last logon: Thu Sep 30 15:26:58 2004 (10 days ago)
Password expires: Never
Password changed: 27 days ago
Locked out: No
Disabled: No
Number of logons: 57
Bad password count: 0
--- 3 ---
Admin "Administrator"
Full Name: ""
System Comment: "Built-in account for administering the computer/domain"
User Comment: ""
Last logon: Mon Oct 11 08:37:23 2004 (0 days ago)
Password expires: Never
Password changed: 28 days ago
Locked out: No
Disabled: No
Number of logons: 56
Bad password count: 26
--- 4 ---
User "ASPNET"
Full Name: "ASP.NET Machine Account"
System Comment: "Account used for running the ASP.NET worker process (aspnet_wp.exe)"
User Comment: "Account used for running the ASP.NET worker process (aspnet_wp.exe)"
Last logon: Never
Password expires: Never
Password changed: 27 days ago
Locked out: No
Disabled: No
Number of logons: 0
Bad password count: 0
--- 5 ---
User "Guest"
Full Name: ""
System Comment: "Built-in account for guest access to the computer/domain"
User Comment: ""
Last logon: Never
Password expires: Never
Password changed: 27 days ago
Locked out: No
Disabled: Yes
Number of logons: 0
Bad password count: 0
--- 6 ---
Admin "hieuln"
Full Name: "hieuln"
System Comment: ""
User Comment: ""
Last logon: Never
Password expires: Never
Password changed: 27 days ago
Locked out: No
Disabled: No
Number of logons: 0
Bad password count: 0
--- 7 ---
User "isphere"
Full Name: "isphere"
System Comment: ""
User Comment: ""
Last logon: Mon Oct 11 08:51:33 2004 (0 days ago)
Password expires: Never
Password changed: 27 days ago
Locked out: No
Disabled: No
Number of logons: 0
Bad password count: 0
--- 8 ---
User "SQLDebugger"
Full Name: "SQLDebugger"
System Comment: "This user account is used by the Visual Studio .NET Debugger"
User Comment: ""
Last logon: Never
Password expires: Never
Password changed: 27 days ago
Locked out: No
Disabled: No
Number of logons: 0
Bad password count: 0
Groups on 192.168.2.13
Group: Administrators
HIEULN\Administrator
HIEULN\hieuln
Group: Backup Operators
Group: Guests
HIEULN\Guest
Group: Power Users
Group: Replicator
Group: Users
NT AUTHORITY\INTERACTIVE
NT AUTHORITY\Authenticated Users
HIEULN\ASPNET
HIEULN\ACTUser
HIEULN\SQLDebugger
HIEULN\Guest
HIEULN\hieuln
HIEULN\isphere
HIEULN\a
Group: Debugger Users
HIEULN\Administrator
Group: NC_S_ISLCK
Group: VS Developers
Password and account policies on 192.168.2.13
Account lockout threshold is 0
Account lockout duration is 30 mins
Minimum password length is 0
Maximum password age is 42 days
Shares on 192.168.2.13
IPC: IPC$ (Remote IPC)
Disk: D$ (Default share)
Disk: virus ()
Disk: books ()
Disk: setup ()
Disk: share ()
Disk: ERP_PCS ()
Disk: hieulnwork_atnight_29 ()
Disk: Windows Script Host 2.0 ()
Disk: ADMIN$ (Remote Admin)
Disk: C$ (Default share)
Domains on 192.168.2.13
Remote time of day on 192.168.2.13
Date: 10/11/2004
Time: 05:06:16
Timezone: GMT +07:00
Uptime: 0 days, 3 hours, 30 minutes
Logon sessions on 192.168.2.13
Total Sessions: 3
\\THIENHD ISPHERE Uptime: 3:14:43 Idle: 0:02:33
\\DEV007 ISPHERE Uptime: 2:50:14 Idle: 0:13:45
\\192.168.2.12 Uptime: 0:00:01 Idle: 0:00:00
Trusted Domains on 192.168.2.13
Remote services on 192.168.2.13
Enumeration complete
==============================================================================
|
|
|
|
|
http://www.microsoft.com/technet/community/scriptcenter/compmgmt/default.mspx
|
|
|
|
|
Hi, I use open dialog control in my VB.NET project to get the file name to the label control on form. It is working fine when I choose the file then it return the value to the label, but How could I control the user if they choose the CANCEL button?
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
If he clicks the Cancel Button the ShowDialog method of OpenFileDialog button will return DialogResult.Cancel and you can check for this to do what you want. Hope I understand your question.
|
|
|
|
|
Thank you very much, now it is working.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Wouldn't it be viable to use a message box to alert the user that he or she has clicked on the cancel button, after using the DialogResult.Cancel to the OpenFileDialog?
bravo659
|
|
|
|
|
Hi,
How could I create COM objects in VB.NET?
I'd be glad if someone tells me.
Thanks.
|
|
|
|
|
|
I have a project to make a spread sheet application like Microsoft Excel using c++. I have problem with the library that i should use. Maybe one of you can help me? Thank's before
|
|
|
|
|
First, this is not a very specific question. You say you "have a problem with the library that i should use". But use for what? There are hundreds of libraries out there, all specialising in one thing or another.
Second, and more importantly, this is not the C++ forum. I suggest you post your question to the correct place and then you might get a response that will help you from people who know the subject area.
Do you want to know more?
Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.
|
|
|
|
|
Hi Help Me I Want Write VBScript Of ("Outlook.Application")
1 ) I want Send E-Mail In list AddressBook Of Outlook At set create list AddressBook
I don't Sent Item.To = "a@a.com;b@asp.com" I want send Program As Question 1
2 ) Function Object ("Outlook.Application") and each Set In Ex.Code I am write Have Properties and Manton P.write Ex. Give Me
Thank
-----------------------
Ex Code Email.vbs
--------------------
'On Error Resume Next ' start code
Set Outlook = CreateObject("Outlook.Application")
Set Item = Outlook.CreateItem(OlTaskItem)
'Item.Assign
Set myDelegate = Item.Recipients.Add("info@microsoft.com")
myDelegate.Resolve
If myDelegate.Resolved Then
Item.Subject = "test"
Item.body= "test"
Item.To = "a@a.com;b@asp.com"
Item.Cc="a@a.com"
Item.Bcc ="a@a.com"
Item.Attachments.Add wScript.ScriptFullName
'Item.DueDate = Now +30
Item.Display
'Item.Send
End If
msgbox "ha"
Set Outlook= CreateObject("Outlook.Application")
Set MAPI = Outlook.GetNameSpace("MAPI")
Set MyFolder = MAPI.GetDefaultFolder(10)
Set Item = MyFolder.Items.Add("IPM.Contact.MyForm")
'Item.Display
Item.FirstName = "FirstName"
Item.LastName = "LastName"
Item.FullName = "FirstName LastName"
Item.CompanyName = "CompanyName"
Item.JobTitle = ""
Item.Department = ""
Item.Email1Address = "info@microsoft.com"
Item.Email1AddressType = "SMTP"
Item.Display
'Item.save ' end code
--------------
fff
|
|
|
|
|
What??? I couldn't understand a single thing you said.
Are you asking how to send an email to a list of addresses found in the Outlook Address Book?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
My customer need to speed dialer program. This is will built into their existing Customer Information System. Whenever they need to call the customer they just need to click on a button and my system need to call to the #. If the line is connected the user just need to pick up the telephone and start talking.
I think i will need to use modem to connect. Problem is if the line is connected, and when the user pick up the phone, my modem is still connected to the line, can they talk like that??? and can i keep track how long they talking to the customer???
i need this urgently, please help. thanx.
|
|
|
|
|
wlho wrote:
I think i will need to use modem to connect.
You could use the modem or there are TAPI modems/cards that will do this. The TAPI version will give you more functionality over a normal modem. A normal modem will dial the phone andlet the user pick it up when the person answers, but after that, the modem will either hang up or will keep the phone off-hook. In either case, it usually will not start a timer tracking the call and will not let you pick that time up in
your software.
wlho wrote:
can they talk like that???
Yes, but anyone around will be able to here everything being said and the speaker in the modem usually will not shut off until there is a data connection.
wlho wrote:
can i keep track how long they talking to the customer???
Not while using a normal modem. You'll need a device specifically designed for such work.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How can I refresh or reload datagrid? I have a main window there is a datagrid, and a child window to add more data into db, I want the datagrid to reload the new data when the child window close and return to the main window. how can I do it?
Lisa
|
|
|
|
|
Use the public void SetDataBinding(
object dataSource,
string dataMember
) of DataGrid to refresh the grid.
|
|
|
|
|
where should I call the SetDataBinding? should I call it at the child window when it close?
|
|
|
|
|
Add an EventHandler for the child window closing in the parent form handle the things in the EventHandler.
Hope this will help.
|
|
|
|
|
Hi, in VB6 I use the following code to create the column header of listview:
Dim clhChildActivities As ColumnHeader
With lvwFoundResult.ColumnHeaders
' "eQµaHkumar";"kabrieqäT";"eQµaHGñkTTYlxusRtÚv";"skmµPaB"
Set clhChildActivities = .Add(1, , "eQµaHkumar")
Set clhChildActivities = .Add(2, , "kabrieqäT")
Set clhChildActivities = .Add(3, , "eQµaHGñkTTYlxusRtÚv")
Set clhChildActivities = .Add(4, , "skmµPaB")
Set clhChildActivities = .Add(5, , "epSg²")
End With
It is working fine
Then I use the following code to transfer the data from the database to list view item and subitem:
Do While .EOF = False
DoEvents
Set ltmChildActivities = lvwFoundResult.ListItems.Add(, , Trim(.Fields(0).Value))
For intSubItemRec = 1 To .Fields.Count - 1
DoEvents
ltmChildActivities.SubItems(intSubItemRec) = _
Trim(.Fields(intSubItemRec).Value)
Next
.MoveNext
pgbRecFound.Value = pgbRecFound.Value + 1
Loop
and it is working fine too
Now I move to VB.NET, I use the following code to call the field from Ms access database to create the column header in list view in VB.NET:
' ******************************************************
'
' Pass the field value to the column header
' of list view.
Dim i As Integer ' Total number of column.
For i = 0 To myReader.FieldCount - 1
lvwCustomers.Columns.Add(myReader.GetName(i).ToString, _
100, HorizontalAlignment.Center)
Next
'
' Pass the field value to the column header is success.
'
' *****************************************************
it also working fine too
And i got the following sample code that add an item and subitem to the list view:
'Dim str(5) As String
'Dim itm As ListViewItem
'str(0) = "Rob Machy"
'str(1) = "100 North Ave"
'str(2) = "Business Manager"
'str(3) = "89,000"
'str(4) = "Development"
'itm = New ListViewItem(str)
'lvwCustomers.Items.Add(itm)
That also working fine
BUT
when I try to transfer the data from database to an item and subitem to the list view as the following code:
' Use Read method of the OleDbDataReader to retrieve data
' use it to GetString method to display data in list view.
Dim ltm As ListViewItem
Dim str(myReader.FieldCount) As String
Dim j As Integer
While myReader.Read()
'txtData.Text = txtData.Text & myReader.GetString(0) & _
'ControlChars.CrLf
For j = 1 To myReader.FieldCount
Try
ltm = New ListViewItem(myReader.GetString(j).ToString)
Catch exSice As System.InvalidCastException
MsgBox("Error occure")
Catch exIofre As System.IndexOutOfRangeException
MsgBox("Check the index of field and index of listview.")
End Try
Next
lvwCustomers.Items.Add(ltm)
End While
it is not success... Can any one help me to transfer the data from database to the list view item and sub item???
Here is the full procedure of the code:
<code>Private Sub btnLoadToListView_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles btnLoadToListView.Click
' Create the query string and
' define new OleDbConnection object.
'Dim mySelectQuery As String = "SELECT CompanyName FROM " & _
'"Suppliers"
Dim mySelectQuery As String
mySelectQuery = "SELECT * FROM Customers"
Dim myConnection As New OleDbConnection("Provider=" & _
"Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\" & _
"Microsoft Office\Office10\Samples\Northwind.mdb")
' Create new OleDbCommand.
Dim myCommand As New OleDbCommand(mySelectQuery, myConnection)
' Open the connection.
myConnection.Open()
' Declare an OleDbDatareader and use ExecuteReader method
' of OleDbCommand to populate it.
Dim myReader As OleDbDataReader
myReader = myCommand.ExecuteReader()
' ******************************************************
'
' Pass the field value to the column header
' of list view.
Dim i As Integer ' Total number of column.
For i = 0 To myReader.FieldCount - 1
lvwCustomers.Columns.Add(myReader.GetName(i).ToString, _
100, HorizontalAlignment.Center)
Next
'
' Pass the field value to the column header is success.
'
' *****************************************************
' Use Read method of the OleDbDataReader to retrieve data
' use it to GetString method to display data in list view.
Dim ltm As ListViewItem
Dim str(myReader.FieldCount) As String
Dim j As Integer
While myReader.Read()
'txtData.Text = txtData.Text & myReader.GetString(0) & _
'ControlChars.CrLf
For j = 1 To myReader.FieldCount
Try
ltm = New ListViewItem(myReader.GetString(j).ToString)
Catch exSice As System.InvalidCastException
MsgBox("Error occure")
Catch exIofre As System.IndexOutOfRangeException
MsgBox("Check the index of field and index of listview.")
End Try
Next
lvwCustomers.Items.Add(ltm)
End While
' Close OleDbDataReader and OleDbConnection.
myReader.Close()
myConnection.Close()
End Sub</code>
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
I have check in my northwind database with Customers table. I found that some field contain NULL value. I check the field number and count the process of For Next statement and found the error become from NULL value of some field. Can anyone tell me how to transfer the NULL value to listview item and ignore an error?
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Ok, may be nobody will help me. I got the information from here[^] to solve the problem with NULL value.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
How do I make a taskbar notification window like the one I see when somebody on MSN signs in? (the blue/white box above the taskbar)
Note: I'm using VB6, not VB.NET
|
|
|
|
|
Active-X Popup MsgBox's
http://www.pscode.com/vb/scripts/ShowCode.asp?txtCodeId=46003&lngWId=-1
|
|
|
|
|
I am learning VB.Net and need to know how to restrict the input of a textbox to numbers only.
Di
|
|
|
|
|
In win forms you can use the Validating event then use the regular experssions classes to match to [0-9]. Web forms have a regular expression validator control.
|
|
|
|