VBS to create a printer instance ?
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 ?
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
[ + ] Show comments
Answers (2)
Please log in to answer
Posted by:
turbokitty
17 years ago
Posted by:
rikx2
17 years ago
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)
'------------------------
rgrds,
rick
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)
'------------------------
rgrds,
rick
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.