knighthawke
IS-IT--Management
Greetings all,
I have just searched the site and did not see a solution that worked for me concerning this issue.
I am trying to use the Net Send command in VB6 without any success. I am a rookie so it's OK to laugh at my code but I found this here somewhere but it did not work and I was wondering what I am doing wrong.
Scenario: I have 18 laptops that get checked out and used in a very large Library building. They are supposed to be turned in at midnight but lots of times we have problems finding all the patrons who forget and just keep working. I have set up a batchfile where the Librarians can edit the batch file to include the name of the laptop and the batchfile works just fine. It looks like this:
net send Laptop1 Please return this laptop to the Reference Desk!
net send Laptop2 Please return this laptop to the Reference Desk!
The box pops up and they bring the laptops in.
I want to simplify life for the more technophobic among the Library staff. So I thought I might be able to use check boxes for the Librarians to select which laptops are still out and then click the Go button. The button would check to see which checkboxes are returning a boolean true and Net Send the message to those Laptops.
Of course this is rocket science for me so I decided to work out the individual pieces first. I am simply, at this point trying to get the net send command to send a message to my machine when I click the Go button. I put this code in the button:
Private Sub btnGo_Click()
Call Shell("Net Send " & MyPCName & " Blah Blah Blah")
End
End Sub
The end result, when I run this, is that a command window opens minimized on my PC and the program ends without ever sending me the message. The command window never closes.
Any thoughts?
Thanks,
KH
I have just searched the site and did not see a solution that worked for me concerning this issue.
I am trying to use the Net Send command in VB6 without any success. I am a rookie so it's OK to laugh at my code but I found this here somewhere but it did not work and I was wondering what I am doing wrong.
Scenario: I have 18 laptops that get checked out and used in a very large Library building. They are supposed to be turned in at midnight but lots of times we have problems finding all the patrons who forget and just keep working. I have set up a batchfile where the Librarians can edit the batch file to include the name of the laptop and the batchfile works just fine. It looks like this:
net send Laptop1 Please return this laptop to the Reference Desk!
net send Laptop2 Please return this laptop to the Reference Desk!
The box pops up and they bring the laptops in.
I want to simplify life for the more technophobic among the Library staff. So I thought I might be able to use check boxes for the Librarians to select which laptops are still out and then click the Go button. The button would check to see which checkboxes are returning a boolean true and Net Send the message to those Laptops.
Of course this is rocket science for me so I decided to work out the individual pieces first. I am simply, at this point trying to get the net send command to send a message to my machine when I click the Go button. I put this code in the button:
Private Sub btnGo_Click()
Call Shell("Net Send " & MyPCName & " Blah Blah Blah")
End
End Sub
The end result, when I run this, is that a command window opens minimized on my PC and the program ends without ever sending me the message. The command window never closes.
Any thoughts?
Thanks,
KH