I have a client who wants to be able to print from his computer to a network-connected laser printer. No problem...except, the network printer is in a different city 105 miles away.
I can think up a few "Rube Goldberg" solutions, but I'm guessing that there is already a way...is there a "Windows Way" to do this?
Many thanks for any brain cycles.
Mike Copeland
1. Remote to a PC in that location. 2. VPN into the network
On Fri, Jun 10, 2016 at 11:21 AM, Mike Copeland mike@ggisoft.com wrote:
I have a client who wants to be able to print from his computer to a network-connected laser printer. No problem...except, the network printer is in a different city 105 miles away.
I can think up a few "Rube Goldberg" solutions, but I'm guessing that there is already a way...is there a "Windows Way" to do this?
Many thanks for any brain cycles.
Mike Copeland
[excessive quoting removed by server]
Thanks Stephen. That's one of my RG solutions. As you say, it requires a PC in remote location that no one uses. Trying to keep people from mucking with an un-attended computer in this company is like fighting off sex addicts at a hooker's convention.
So Windows doesn't have any way to route packets via TCP-IP protocol to a printer at a remote location? I find that surprising.
Mike C
Stephen Russell wrote:
- Remote to a PC in that location.
- VPN into the network
On Fri, Jun 10, 2016 at 11:21 AM, Mike Copeland mike@ggisoft.com wrote:
I have a client who wants to be able to print from his computer to a network-connected laser printer. No problem...except, the network printer is in a different city 105 miles away.
I can think up a few "Rube Goldberg" solutions, but I'm guessing that there is already a way...is there a "Windows Way" to do this?
Many thanks for any brain cycles.
Mike Copeland
[excessive quoting removed by server]
It is how the network is configured where you want the printing to be done.
Do they use AD, and do you have print servers set up? If so then you are pretty close. If the printers are just attached to a workstation then it is harder.
On Fri, Jun 10, 2016 at 11:37 AM, Mike Copeland mike@ggisoft.com wrote:
Thanks Stephen. That's one of my RG solutions. As you say, it requires a PC in remote location that no one uses. Trying to keep people from mucking with an un-attended computer in this company is like fighting off sex addicts at a hooker's convention.
So Windows doesn't have any way to route packets via TCP-IP protocol to a printer at a remote location? I find that surprising.
Mike C
Stephen Russell wrote:
- Remote to a PC in that location.
- VPN into the network
On Fri, Jun 10, 2016 at 11:21 AM, Mike Copeland mike@ggisoft.com wrote:
I have a client who wants to be able to print from his computer to a
network-connected laser printer. No problem...except, the network printer is in a different city 105 miles away.
I can think up a few "Rube Goldberg" solutions, but I'm guessing that there is already a way...is there a "Windows Way" to do this?
Many thanks for any brain cycles.
Mike Copeland
[excessive quoting removed by server]
No, no AD and therefore no print servers. All printers are IP (network) based and all servers are Linux, while workstations are Win7Pro.
Mike
Stephen Russell wrote:
It is how the network is configured where you want the printing to be done.
Do they use AD, and do you have print servers set up? If so then you are pretty close. If the printers are just attached to a workstation then it is harder.
On Fri, Jun 10, 2016 at 11:37 AM, Mike Copeland mike@ggisoft.com wrote:
Thanks Stephen. That's one of my RG solutions. As you say, it requires a PC in remote location that no one uses. Trying to keep people from mucking with an un-attended computer in this company is like fighting off sex addicts at a hooker's convention.
So Windows doesn't have any way to route packets via TCP-IP protocol to a printer at a remote location? I find that surprising.
Mike C
Stephen Russell wrote:
- Remote to a PC in that location.
- VPN into the network
On Fri, Jun 10, 2016 at 11:21 AM, Mike Copeland mike@ggisoft.com wrote:
I have a client who wants to be able to print from his computer to a
network-connected laser printer. No problem...except, the network printer is in a different city 105 miles away.
I can think up a few "Rube Goldberg" solutions, but I'm guessing that there is already a way...is there a "Windows Way" to do this?
Many thanks for any brain cycles.
Mike Copeland
[excessive quoting removed by server]
On Fri, Jun 10, 2016 at 3:48 PM, Mike Copeland mike@ggisoft.com wrote:
all servers are Linux,
Well, you're saved then. Linux has been printing over the internet since there was one!
Is there any interconnectivity between the two offices now? VPN, stunnel, ssh? Pretty much anything that would allow port forwarding would do.
If not, set up a persistent ssh tunnel. For security sake, you'll want to use a non-standard tunnel and a public key, private key pair, no passwords allowed, to minimize the hacking surface between the two.
Install CUPS on both local and remote servers.Forward port 631 (CUPS) from the remote machine to the local, on a different port, and define a printer on the local CUPS server that prints to that port.
Easy-peasy.
That makes total sense and yes, it's not a problem to communicate between a Linux box at the source location to the Linux box at the remote (printer) location. In fact, I already have a routine that runs every ten minutes and transfers an inventory status report (html) between these same two locations.
I LOVE this kind of stuff! Thanks Ted!
The only thing I've never done is set up a CUPS server, but I don't think it will be a problem.
Thanks again!
Mike
Ted Roche wrote:
On Fri, Jun 10, 2016 at 3:48 PM, Mike Copeland mike@ggisoft.com wrote:
all servers are Linux,
Well, you're saved then. Linux has been printing over the internet since there was one!
Is there any interconnectivity between the two offices now? VPN, stunnel, ssh? Pretty much anything that would allow port forwarding would do.
If not, set up a persistent ssh tunnel. For security sake, you'll want to use a non-standard tunnel and a public key, private key pair, no passwords allowed, to minimize the hacking surface between the two.
Install CUPS on both local and remote servers.Forward port 631 (CUPS) from the remote machine to the local, on a different port, and define a printer on the local CUPS server that prints to that port.
Easy-peasy.
Whoa....now that I know what I'm looking for, I'm finding articles and blogs and how-to's all over.
Thanks again, Ted!
Mike
Ted Roche wrote:
On Fri, Jun 10, 2016 at 3:48 PM, Mike Copeland mike@ggisoft.com wrote:
all servers are Linux,
Well, you're saved then. Linux has been printing over the internet since there was one!
Is there any interconnectivity between the two offices now? VPN, stunnel, ssh? Pretty much anything that would allow port forwarding would do.
If not, set up a persistent ssh tunnel. For security sake, you'll want to use a non-standard tunnel and a public key, private key pair, no passwords allowed, to minimize the hacking surface between the two.
Install CUPS on both local and remote servers.Forward port 631 (CUPS) from the remote machine to the local, on a different port, and define a printer on the local CUPS server that prints to that port.
Easy-peasy.
I've been using the following technique to open an instance of Excel for years:
If Upper(Vartype(Thisform.oExcel)) = "O" Thisform.oExcel.Quit Thisform.oExcel = null Else Thisform.AddProperty('oExcel') Endif
If Upper(Vartype(Thisform.oExcel)) <> "O" Thisform.oExcel=Createobject("Excel.Application") Else Thisform.oExcel=Getobject(,"Excel.Application") Endif
The above is taken from the Hacker's Guide
However, sometimes Excel throws an error. Therefore in my form class error method I put this construct:
If nError = 1426 && Excel error
If Vartype(thisform.oExcel ) = "O"
thisform.oExcel.quit Thisform.oExcel = null
endif endif
Yet, it does not kill the Excel instance. I mean, the Excel instance is still open. It just does not go away. The only way to kill it is to open the task manager and kill it manually
I follow the Excel method step by step, and reproduce the error condition. The error method fires, the oExcel object exists, the line "thisform.oExcel.quit" executes, but it does not kill the Excel instance
????????
Rafael Copquin
Here's a snippit of code I have been using with great success recently. I wish I remembered where it came from but it is the best way to terminate a Windows application that I've found.
I use it to close the application if it is left running by the end user. It simply tests to see if the # of seconds since midnight is greater than a predefined # of seconds. For your need, I don't think you'd need the time check.
Hope this helps!
LOCAL loLocator, loWMI, loProcesses, loProcess, llIsRunning loLocator = CREATEOBJECT('WBEMScripting.SWBEMLocator') loWMI = loLocator.ConnectServer() loWMI.Security_.ImpersonationLevel = 3 loProcesses = loWMI.ExecQuery([SELECT * FROM Win32_Process WHERE Name = 'MyApplicationName.exe']) FOR EACH loProcess in loProcesses loProcess.Terminate(0) ENDFOR
Mike Copeland
rafael copquin wrote:
I've been using the following technique to open an instance of Excel for years:
If Upper(Vartype(Thisform.oExcel)) = "O" Thisform.oExcel.Quit Thisform.oExcel = null Else Thisform.AddProperty('oExcel') Endif
If Upper(Vartype(Thisform.oExcel)) <> "O" Thisform.oExcel=Createobject("Excel.Application") Else Thisform.oExcel=Getobject(,"Excel.Application") Endif
The above is taken from the Hacker's Guide
However, sometimes Excel throws an error. Therefore in my form class error method I put this construct:
If nError = 1426 && Excel error
If Vartype(thisform.oExcel ) = "O"
thisform.oExcel.quit Thisform.oExcel = null endifendif
Yet, it does not kill the Excel instance. I mean, the Excel instance is still open. It just does not go away. The only way to kill it is to open the task manager and kill it manually
I follow the Excel method step by step, and reproduce the error condition. The error method fires, the oExcel object exists, the line "thisform.oExcel.quit" executes, but it does not kill the Excel instance
????????
Rafael Copquin
[excessive quoting removed by server]
The Excel object probably is waiting for you to ask it if you want to save any unsaved changes but the dialog is not being displayed. If you set the saved property of the active workbook to true before you call the Quit event, that should clear things up.
m.loExcel.ActiveWorkbook.Saved= .T. && this prevents Excel prompt when we destroy the Excel object
Another thing you can try to do if you want to dig into why the Excel object is in an odd state is make it visible in your error handler before you call the quit event.
--
rk
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Mike Copeland Sent: Friday, June 10, 2016 5:28 PM To: profoxtech@leafe.com Subject: Re: Excel automation
Here's a snippit of code I have been using with great success recently. I wish I remembered where it came from but it is the best way to terminate a Windows application that I've found.
I use it to close the application if it is left running by the end user. It simply tests to see if the # of seconds since midnight is greater than a predefined # of seconds. For your need, I don't think you'd need the time check.
Hope this helps!
LOCAL loLocator, loWMI, loProcesses, loProcess, llIsRunning loLocator = CREATEOBJECT('WBEMScripting.SWBEMLocator') loWMI = loLocator.ConnectServer() loWMI.Security_.ImpersonationLevel = 3 loProcesses = loWMI.ExecQuery([SELECT * FROM Win32_Process WHERE Name = 'MyApplicationName.exe']) FOR EACH loProcess in loProcesses loProcess.Terminate(0) ENDFOR
Mike Copeland
rafael copquin wrote:
I've been using the following technique to open an instance of Excel for years:
If Upper(Vartype(Thisform.oExcel)) = "O" Thisform.oExcel.Quit Thisform.oExcel = null Else Thisform.AddProperty('oExcel') Endif
If Upper(Vartype(Thisform.oExcel)) <> "O" Thisform.oExcel=Createobject("Excel.Application") Else Thisform.oExcel=Getobject(,"Excel.Application") Endif
The above is taken from the Hacker's Guide
However, sometimes Excel throws an error. Therefore in my form class error method I put this construct:
If nError = 1426 && Excel error
If Vartype(thisform.oExcel ) = "O"
thisform.oExcel.quit Thisform.oExcel = null endifendif
Yet, it does not kill the Excel instance. I mean, the Excel instance is still open. It just does not go away. The only way to kill it is to open the task manager and kill it manually
I follow the Excel method step by step, and reproduce the error condition. The error method fires, the oExcel object exists, the line "thisform.oExcel.quit" executes, but it does not kill the Excel instance
????????
Rafael Copquin
[excessive quoting removed by server]
This worked!
Thank you all that replied
Rafael Copquin
On 10/06/2016 19:09, Richard Kaye wrote:
The Excel object probably is waiting for you to ask it if you want to save any unsaved changes but the dialog is not being displayed. If you set the saved property of the active workbook to true before you call the Quit event, that should clear things up.
m.loExcel.ActiveWorkbook.Saved= .T. && this prevents Excel prompt when we destroy the Excel object
Another thing you can try to do if you want to dig into why the Excel object is in an odd state is make it visible in your error handler before you call the quit event.
--
rk
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Mike Copeland Sent: Friday, June 10, 2016 5:28 PM To: profoxtech@leafe.com Subject: Re: Excel automation
Here's a snippit of code I have been using with great success recently. I wish I remembered where it came from but it is the best way to terminate a Windows application that I've found.
I use it to close the application if it is left running by the end user. It simply tests to see if the # of seconds since midnight is greater than a predefined # of seconds. For your need, I don't think you'd need the time check.
Hope this helps!
LOCAL loLocator, loWMI, loProcesses, loProcess, llIsRunning loLocator = CREATEOBJECT('WBEMScripting.SWBEMLocator') loWMI = loLocator.ConnectServer() loWMI.Security_.ImpersonationLevel = 3 loProcesses = loWMI.ExecQuery([SELECT * FROM Win32_Process WHEREName = 'MyApplicationName.exe']) FOR EACH loProcess in loProcesses loProcess.Terminate(0) ENDFOR
Mike Copeland
rafael copquin wrote:
I've been using the following technique to open an instance of Excel for years:
If Upper(Vartype(Thisform.oExcel)) = "O" Thisform.oExcel.Quit Thisform.oExcel = null Else Thisform.AddProperty('oExcel') Endif
If Upper(Vartype(Thisform.oExcel)) <> "O" Thisform.oExcel=Createobject("Excel.Application") Else Thisform.oExcel=Getobject(,"Excel.Application") Endif
The above is taken from the Hacker's Guide
However, sometimes Excel throws an error. Therefore in my form class error method I put this construct:
If nError = 1426 && Excel error
If Vartype(thisform.oExcel ) = "O" thisform.oExcel.quit Thisform.oExcel = null endifendif
Yet, it does not kill the Excel instance. I mean, the Excel instance is still open. It just does not go away. The only way to kill it is to open the task manager and kill it manually
I follow the Excel method step by step, and reproduce the error condition. The error method fires, the oExcel object exists, the line "thisform.oExcel.quit" executes, but it does not kill the Excel instance
????????
Rafael Copquin
[excessive quoting removed by server]
You might try disabling Alerts (like a file needing to be saved) .
thisform.oExcel.DisplayAlerts = .f.
You can put this just before your thisform.oExcel.Quit() line, or anywhere after you've created your Excel instance if you don't want to see alerts at all.
Fred
On Fri, Jun 10, 2016 at 2:12 PM, rafael copquin rcopquin@yahoo.com.ar wrote:
I've been using the following technique to open an instance of Excel for years:
If Upper(Vartype(Thisform.oExcel)) = "O" Thisform.oExcel.Quit Thisform.oExcel = null Else Thisform.AddProperty('oExcel') Endif
If Upper(Vartype(Thisform.oExcel)) <> "O" Thisform.oExcel=Createobject("Excel.Application") Else Thisform.oExcel=Getobject(,"Excel.Application") Endif
The above is taken from the Hacker's Guide
However, sometimes Excel throws an error. Therefore in my form class error method I put this construct:
If nError = 1426 && Excel error
If Vartype(thisform.oExcel ) = "O"
thisform.oExcel.quit Thisform.oExcel = null endifendif
Yet, it does not kill the Excel instance. I mean, the Excel instance is still open. It just does not go away. The only way to kill it is to open the task manager and kill it manually
I follow the Excel method step by step, and reproduce the error condition. The error method fires, the oExcel object exists, the line "thisform.oExcel.quit" executes, but it does not kill the Excel instance
????????
Rafael Copquin
[excessive quoting removed by server]
On Fri, Jun 10, 2016 at 5:12 PM, rafael copquin rcopquin@yahoo.com.ar wrote:
The above is taken from the Hacker's Guide
In defense of the nice folks who wrote the Hacker's Guide :), I'd like to point out that two of them went on to write, and a third to edit, the book on Office Automation, which might point out some better solutions.
I'm off for the weekend, but you might want to check out the chm/pdf of "AutoFox" if you have it handy.
Google "Google Cloud Print". We used it for a saleperson we had in Nebraska, so they could print here in Phoenix. It worked pretty well, in spite or them having a satellite internet service, which in most ways was just horrible.
Fred
On Fri, Jun 10, 2016 at 9:21 AM, Mike Copeland mike@ggisoft.com wrote:
I have a client who wants to be able to print from his computer to a network-connected laser printer. No problem...except, the network printer is in a different city 105 miles away.
I can think up a few "Rube Goldberg" solutions, but I'm guessing that there is already a way...is there a "Windows Way" to do this?
Many thanks for any brain cycles.
Mike Copeland
[excessive quoting removed by server]
This looks very promising, Fred! Thanks!
I'm reading Google's fluffery now.
Mike
Fred Taylor wrote:
Google "Google Cloud Print". We used it for a saleperson we had in Nebraska, so they could print here in Phoenix. It worked pretty well, in spite or them having a satellite internet service, which in most ways was just horrible.
Fred
On Fri, Jun 10, 2016 at 9:21 AM, Mike Copeland mike@ggisoft.com wrote:
I have a client who wants to be able to print from his computer to a network-connected laser printer. No problem...except, the network printer is in a different city 105 miles away.
I can think up a few "Rube Goldberg" solutions, but I'm guessing that there is already a way...is there a "Windows Way" to do this?
Many thanks for any brain cycles.
Mike Copeland
[excessive quoting removed by server]
My epson had an email address. Ive not used it for ages but it did work Al
-----Original Message----- From: Mike Copeland Sent: Friday, June 10, 2016 6:21 PM To: profoxtech@leafe.com Subject: [NF] Remote printing
I have a client who wants to be able to print from his computer to a network-connected laser printer. No problem...except, the network printer is in a different city 105 miles away.
I can think up a few "Rube Goldberg" solutions, but I'm guessing that there is already a way...is there a "Windows Way" to do this?
Many thanks for any brain cycles.
Mike Copeland
That's kind of an interesting approach...so you would send it an email, it would 'fetch' the email like an email client, and then print the email and/or attachment? I wonder how it would format the attachment? It would have to open a DOC file as a Word document and then rasterize it...wow, that's a difficult (for them to make) solution!
Thanks Al!
Mike
Allen wrote:
My epson had an email address. Ive not used it for ages but it did work Al
-----Original Message----- From: Mike Copeland Sent: Friday, June 10, 2016 6:21 PM To: profoxtech@leafe.com Subject: [NF] Remote printing I have a client who wants to be able to print from his computer to a network-connected laser printer. No problem...except, the network printer is in a different city 105 miles away.
I can think up a few "Rube Goldberg" solutions, but I'm guessing that there is already a way...is there a "Windows Way" to do this?
Many thanks for any brain cycles.
Mike Copeland
[excessive quoting removed by server]
I have a WF-3520 and it allows the printer to be registered with its own email address. It also allows IP address printing which I'm sure windows can cope with Al
-----Original Message-----
That's kind of an interesting approach...so you would send it an email, it would 'fetch' the email like an email client, and then print the email and/or attachment? I wonder how it would format the attachment? It would have to open a DOC file as a Word document and then rasterize it...wow, that's a difficult (for them to make) solution!
Thanks Al!
Mike:
Several of the printer manufacturers offer the equivalent of Cloud Print, like HP Mobile Printing:
http://www8.hp.com/us/en/ads/mobility/overview.html?jumpid=va_r11400_mobilep...
So, you might want to check if the manufacturer offers something similar.
Failing that, you can use IPP (Internet Printing Protocol) if your router supports it.
Bear in mind any of these solutions open holes in firewalls to let things through, and need to be reviewed carefully.
On Fri, Jun 10, 2016 at 12:21 PM, Mike Copeland mike@ggisoft.com wrote:
I have a client who wants to be able to print from his computer to a network-connected laser printer. No problem...except, the network printer is in a different city 105 miles away.
I can think up a few "Rube Goldberg" solutions, but I'm guessing that there is already a way...is there a "Windows Way" to do this?
Many thanks for any brain cycles.
Mike Copeland
[excessive quoting removed by server]
Thanks, Ted.
I knew there was an Internet protocol that addressed printing...I just couldn't remember the name. I agree, opening a port for this specific option seems goofy though. The Google Cloud Printing looks really promising and there are a huge number of printers from many different manufacturers that support it. In fact, I installed a new Samsung printer yesterday that supports cloud printing by Google.
Mike
Ted Roche wrote:
Mike:
Several of the printer manufacturers offer the equivalent of Cloud Print, like HP Mobile Printing:
http://www8.hp.com/us/en/ads/mobility/overview.html?jumpid=va_r11400_mobilep...
So, you might want to check if the manufacturer offers something similar.
Failing that, you can use IPP (Internet Printing Protocol) if your router supports it.
Bear in mind any of these solutions open holes in firewalls to let things through, and need to be reviewed carefully.
On Fri, Jun 10, 2016 at 12:21 PM, Mike Copeland mike@ggisoft.com wrote:
I have a client who wants to be able to print from his computer to a network-connected laser printer. No problem...except, the network printer is in a different city 105 miles away.
I can think up a few "Rube Goldberg" solutions, but I'm guessing that there is already a way...is there a "Windows Way" to do this?
Many thanks for any brain cycles.
Mike Copeland
[excessive quoting removed by server]