I need help with VBscripting!
I am a system administrator just beginning to learn VB and ASP scripting. I'm trying to integrate the code with an HTML site I have created for installing printer packages on my network.
Bascially, the main page contains a form with a text box where the user enters the name of the printer, and clicks the submit button. This page then calls another ASP page with the code. I have a portion of the code working - when I type in the printer name, and click submit, the querystring returns the value of PrinterName=whatever was typed in the textbox.
In this example, say the user has typed in 45-111 as the printer name. I need to append that name with a .pwc extension, then have it search thru a single directory. If it finds 45-111.pwc, I need it to open the file. If it doesn't find 45-111.pwc, I need to issue some type of error (i.e. document.write("Printer " & strPrinterName & " is an invalid printer.")
I know that this is pretty elementary stuff for all of you - I'm still trying to learn (but I need to get this script finished!). Any help would be GREATLY appreciated!
June 10th, 2003, 04:51 AM
June 10th, 2003, 09:22 AM
In the future please use a more appropriate subject title. Follow the link in the sticky at the top of this forum for more information on how to post.
Thanks, and welcome to the community...
June 10th, 2003, 10:52 AM
ASP/VB scripting with FSO execution
Jokre, thanks for the URLs - they were very helpful. I'm going to delve back into working on my ASP page today.
To answer your question, it probably would have been better if I had said execute rather than open. The .PWC files are prism package files that launch the installation of applications (or in this case, printers) on workstations with the prism client installed.
Thanks again for your help!
Onslaught: my apologies on the thread subject...it was not my intention to annoy the moderator on the very first post!
June 10th, 2003, 11:23 AM
i think you can use the windows scripting host runtime method CreateObject("WScript.Shell").Run( ... )
June 10th, 2003, 03:22 PM
Thanks for the help - the page is working now. BUT, I am having problems pointing the server.mapPath to a directory outside of the ASP page's home directory. I've detailed the problem on the ASP discussion board at:
If anyone can offer their expertise, I'd appreciate it!