Shibuya Posted September 30, 2005 Posted September 30, 2005 i'm trying to do a script that sets the printer port of a printer so far i've figured out to do it via editing the registry apparently for NT based platforms, it requires restarting of the spooler, ("net stop spooler", then "net start spooler" in the command prompt) for the settings to take effect. i want to do the same for the Win9x/ME platforms, but seems that "net stop/start spooler" is not an accepted command. Anyone can tell me what i should do to go about it? The speed of sound is defined by the distance from door to computer divided by the time interval needed to close the media player and pull up your pants when your mom shouts "OH MY GOD WHAT ARE YOU DOING!!!"
Westi Posted September 30, 2005 Posted September 30, 2005 In Win 9x/ME services are not possible. "spool32.exe" do the printer spooling thing You can found it in "drive:\windir\system\spool32.exe" It is only active for the spooling time when you start a printjob. So your script should work without any commands.
Shibuya Posted October 3, 2005 Author Posted October 3, 2005 @Westi I just tested the script and checked, my file isn't printing to the file port. I'm including the script below to make things clearer: $printer_name = "HP OfficeJet" $printer_port = "FILE:" RegWrite("HKLM\SYSTEM\CurrentControlSet\Control\Print\Printers\" & $printer_name, "Port", "REG_SZ", $printer_port) ;the code here below is actually meant for NT based systems to restart the spooler ;restarting the spooler makes the changes to the registry take effect immediately for the above case. It doesn't work for Win 9x/ME platforms RunWait("Net Stop Spooler", "", @SW_HIDE) RunWait("Net Start Spooler", "", @SW_HIDE) I've looked thru MSDN and other knowledge bases, which mentioned a little of WMI with regards to the writing of printer drivers to the registry. Do I need to use WMI as well to make the changes take effect? The speed of sound is defined by the distance from door to computer divided by the time interval needed to close the media player and pull up your pants when your mom shouts "OH MY GOD WHAT ARE YOU DOING!!!"
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