uncommon Posted December 6, 2012 Posted December 6, 2012 I am making an install script for installing printers without having to reboot, I have been successful so far except when I try to configure the printer driver. I can use... 'rundll32 printui.dll,PrintUIEntry /e /n "printername"' To bring up printing preferences but I have searched the internet for find a command to bring up "printer defaults" normally found in the advance tab and found nothing. This is necessary for other computers trying to access this printer. I have also tried to import printer settings via "RUNDLL32 PRINTUI.DLL,PrintUIEntry /Sr /n " & """" & $drivername & """" & " /a " & """" & @TempDir & "\TSC TDP-247.dat" & """" But there are issues making this work with 64bit computing, mostly the “.dat” is not interchangeable from different 64bit systems. Anyway, How do I get to “Printing defaults” via CMD? Or is there some other way to set printer defaults automaticly? No problem can withstand the assault of sustained thinking.Voltaire _Array2HTMLTable(), _IEClassNameGetCollection(), _IEquerySelectorAll()
ctyankeeinok Posted January 4, 2013 Posted January 4, 2013 (edited) Try this page. It has all of the command settings for the RUNDLL32 PRINTUI.DLL,PrintUIEntry command. I did not see defaults, but you can display properties and preferences.http://technet.microsoft.com/en-us/library/ee624057(v=ws.10).aspx Edited January 4, 2013 by ctyankeeinok
uncommon Posted February 1, 2013 Author Posted February 1, 2013 Actually I did find a way to solve my problem but not necessarily they way I though.My originaly solution was to focuse to the tab and do a control send to move to the right tab. You will notice this fuction will break in windows vista and up if the tabs have more than one level (in other words if you have to move to a tab thats up or down and over). But now I have a way to simply jump to the right tab.I still use RUNDLL32 PRINTUI.DLL,PrintUIEntry to bring up printer properties but instead of using a control send I used a new command that in the beta called..._GUICtrlTab_FindTab_GUICtrlTab_ClickTab_GUICtrlTab_GetCurSelAnd used it in this fuction. This is not my handy work tho and I dont remeber the person who made this fuction but I think he was a monitor here.Func _SetwinTab($sTitle, $tabname) ;This only workd for windows tabs WinWait($sTitle, "", 10) $hWnd = WinGetHandle($sTitle) If @error Then _Exitonerror("Failed to open " & $sTitle & " window.") WinActivate($hWnd) Sleep(100) ; Get handle to Tab control $hTab = ControlGetHandle($hWnd, "", "SysTabControl321") If @error Then _Exitonerror("Failed to get handle to TAB control.") ; Find and select Advanced tab $iAdvTab = _GUICtrlTab_FindTab($hTab, $tabname) If $iAdvTab = -1 Then _Exitonerror("Failed to find " & $tabname & " tab.") _GUICtrlTab_ClickTab($hTab, $iAdvTab) If _GUICtrlTab_GetCurSel($hTab) <> $iAdvTab Then _Exitonerror("Failed to change selected tab to " & $tabname & ".") EndFunc ;==>_SetwinTabThanks nameless solider on the battle field of coding. No problem can withstand the assault of sustained thinking.Voltaire _Array2HTMLTable(), _IEClassNameGetCollection(), _IEquerySelectorAll()
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now