After the vbs to create me a printer instance due to the vendors custom action not installing it as wanted and not liking deffered exe in the system context.

I'm going to add it to Active setup and se if this sorts the problem for me ?

Big cheers in advance if anyone can help me ?
0 Comments   [ - ] Hide Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity


I don't really follow you. Are you looking for the VBS code necessary to create a printer connection?
If so, this should be moved to the Scripting forum.
Answered 10/06/2006 by: turbokitty
Sixth Degree Black Belt

Please log in to comment
Option Explicit

Dim WshShell,objFSO,Return,Windows,ProgramFiles
Set WshShell = CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Windows = WshShell.ExpandEnvironmentStrings("%windir%")
ProgramFiles = WshShell.ExpandEnvironmentStrings("%ProgramFiles%")

Return = WshShell.Run("net stop spooler",0,True)
Return = WshShell.Run("net start spooler",0,True)

' WorkingDir="<directory where your drivers or files should be">
' Windows=Windows + "inf\<your inf.inf>"

Return = WshShell.Run("rundll32 printui.dll,PrintUIEntry /if /b ""<name of your printer>"" /f " + Windows + " /r ""<port>"" /m ""printer driver model name"" /q /l" & """" <your source path """",0,TRUE)


Answered 10/11/2006 by: rikx2
Purple Belt

Please log in to comment