Ask a Question related to ASP, Design and Development.
-
kyiu #1
lost in ASP & WSH!please help!
I am using the VBScript and WSH to get the existing
printer network. The code:
<script language="VBScript" type="text/VBScript">
Dim existing
Set WshNetwork = CreateObject("WScript.Network")
Set objPrinters = WshNetwork.EnumPrinterConnections
For i = 0 to objPrinters.Count - 1 Step 2
MsgBox objPrinters.Item(i+1)
Next
</script>
The code works, however, I wanna show it on my asp
webpage, how can i get the VBS variable and then use
response.write to show "objPrinter.Item" ???
Please help!!Thanks a lot!!!
kyiu Guest
-
help I'm lost
Hi everyone I am working on a website and to get me going I used a template, which I am editing using Dreamweaver 8 and associated programs... -
Lost CD
Hi everyone, I purchased the book Macromedia Dreamweaver MX 2004 with asp, coldfusion, and php. Unfortunately, whilst working in the library, I... -
Lost as can be
I am completely lost. I used a WebMatrix wizard and tried to make it a DataList. I get no errors but it doesn't work either. I really need help.... -
lost of 8MB of RAM on my
Hi, I recently bought a new laptop from toshiba, and it should have 512MB of RAM but in the sytem properties it tells me that I have 496 MB of... -
I've lost it!
Not long ago in the Adobe Exchange, someone posted either a style or an action that produced a "swiss cheese" effect. If I'm not mistaken, it was... -
Dhananjay Modak #2
Re: lost in ASP & WSH!please help!
your code - slightly modified - works
<%
Dim WshNetwork, objPrinters, i
Set WshNetwork = server.CreateObject("WScript.Network")
Set objPrinters = WshNetwork.EnumPrinterConnections
For i = 0 to objPrinters.Count - 1 Step 2
response.write objPrinters.Item(i+1) & "<br/>"
Next
%>
If you dont see any printers the reason could be as follows:
Your web page might be running as anonymous (generally the user context
would be IUSR_<machine name>). If the printer connections are attached to
the logged in user profile then IUSR_... won't have any. Change the
security on the ASP page - remove anonymous and turn ON Integrated. It
should work now.
"kyiu" <karenyiu@hkusua.hku.hk> wrote in message
news:064e01c3478d$e89a8f30$a601280a@phx.gbl...> I am using the VBScript and WSH to get the existing
> printer network. The code:
>
> <script language="VBScript" type="text/VBScript">
> Dim existing
> Set WshNetwork = CreateObject("WScript.Network")
>
> Set objPrinters = WshNetwork.EnumPrinterConnections
>
> For i = 0 to objPrinters.Count - 1 Step 2
> MsgBox objPrinters.Item(i+1)
> Next
> </script>
>
> The code works, however, I wanna show it on my asp
> webpage, how can i get the VBS variable and then use
> response.write to show "objPrinter.Item" ???
>
> Please help!!Thanks a lot!!!
>
Dhananjay Modak Guest



Reply With Quote

