Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Calling VBS

I'm not too sure where the following is going wrong. For now I'm just trying to get the first button to work. Any ideas?

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

Public Sub Copier3()
Set objWSH = CreateObject("WScript.Shell")
strCMD = "cscript.exe C:PMPCopier3.vbs"

End Sub

Untitled Page




Set WshNetwork = CreateObject("WScript.Network")
Set WshShell = CreateObject("WScript.Shell")
WshNetwork.AddWindowsPrinterConnection strPrinter
WshNetwork.SetDefaultPrinter strPrinter

MsgBox strPrinter & " Printer connected and set as the default printer"
Set WshNetwork = WScript.CreateObject("WScript.Network")

Sign In or Register to comment.