![]() |
Newbie question - Selecting from a choice
Hi,
I am teaching myself vb and am sure this is simple i guess i just need a shove in the right direction. I am installing a number of network printers which all install fine but what i would like is for a popup box to appear where the user can select the location from say 5 locations. basically i have say 50 printers in 5 locations. I want to choose the location and then it would install the printers for that location location a location b location c location d location e and then depending on what they selected is would install all the printers from that location? I am guessing i would some how need to create a variable for each of location? Below is how i am currently adding the printers but this way i am having to edit the file a lot my suggested way would be that i could add all the printers and then just choose the location wnet.AddWindowsPrinterConnection "\\server\printername" Any help you could offer would be greatfully appreicated. Phil |
sorry this should be in VB script programming could someone move it?
|
For starters, create functions for each location, and a particular locations function contains all of the printers to install for that location.
I am not sure about getting multiple question/selection options from a VB script, i have seen .hta (html applications) that request input, and from what i have seen, they are pretty much just vbs. http://www.microsoft.com/technet/scr...hubs/htas.mspx |
thanks i will check out .hta
|
A quick way you could do it is have a *.vbs for each area. Then on a web page make a link to each one? Just a random off the top. I am sure there would be security prompts in doing this.
|
the hta will work thats fine. Another simple question i have is if i have a variable called printserver how would i call it would the below be correct?
wnet.AddWindowsPrinterConnection printserver("") & ("\xxx") printerserver is the server name pulled from a listbox and xxx is the printer name |
Quote:
wnet.AddWindowsPrinterConnection (printserver) & "\xxx" |
| All times are GMT -5. The time now is 2:11 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC