AOA Forums AOA Forums AOA Forums Folding For Team 45 AOA Files Home Front Page Become an AOA Subscriber! UserCP Calendar Memberlist FAQ Search Forum Home


Go Back   AOA Forums > Hardware > Mobile Devices and Networking


Reply
 
LinkBack Thread Tools Rate Thread
  #1 (permalink)  
Old 22nd November, 2010, 01:55 AM
Rondog's Avatar
Member
 
Join Date: January 2005
Location: Victoria, Australia
Posts: 3,298
Send a message via MSN to Rondog

Scripting connection to printer terminal services client

Got a weird one, user connecting to terminal server only maps some of their printers not all of them. User rings me: "My HP printer is missing again" I then login to the server as an admin, install a local printer on port TS00x pick the HP driver and then it appears for the user and it will print fine. But unfortunately I have to do this every morning after the user connects. It does not hold the connection permanently.

One option is to leave the session connected forever (painful if I want to reboot the server).

Or script the connection to the printer automatically on logon. How would I accomplish the latter?

Thanks folks.

$50 donation to AOA if I can get it solved.
__________________
AOA Team fah

Rig 1: Intel Core i5 750,4gb,HD6870,500gb,W7 Ult x64
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 8th December, 2010, 04:36 PM
Chief Systems Administrator
 
Join Date: September 2001
Location: Europe
Posts: 13,075

Usually with the logon script set against the user's account...
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10th December, 2010, 06:28 AM
Rondog's Avatar
Member
 
Join Date: January 2005
Location: Victoria, Australia
Posts: 3,298
Send a message via MSN to Rondog

Thats what I would like to do. But I do not know the command to type to connect to a redirected printer. Any insight?
__________________
AOA Team fah

Rig 1: Intel Core i5 750,4gb,HD6870,500gb,W7 Ult x64
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 10th December, 2010, 05:02 PM
Chief Systems Administrator
 
Join Date: September 2001
Location: Europe
Posts: 13,075

Just reading between the lines - you're having to re-establish the connection between the server and the printer each time around? Does that mean it affects all users who use the printer in question?

If you were simply mapping a printer through to a server, then you'd just use the AddWindowsPrinterConnection method on wshnetwork like:

Code:
Option Explicit
Dim strPrinterUNC, objNet
On Error Resume Next
strPrinterUNC="\\server\printer"
set objNet= CreateObject("Wscript.Network")
objNet.AddWindowsPrinterConnection strPrinterUNC
If Err.Number <> 0 Then wscript.echo "Printer mapping failed with " & Err.Number
__________________

Last edited by Áedán; 10th December, 2010 at 05:02 PM. Reason: stupid tags
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 12th December, 2010, 03:54 AM
Rondog's Avatar
Member
 
Join Date: January 2005
Location: Victoria, Australia
Posts: 3,298
Send a message via MSN to Rondog

The problem I am facing though is that the client is a remote user using a mobile Internet card. They are not apart of the same local network. So \\server does not work.
__________________
AOA Team fah

Rig 1: Intel Core i5 750,4gb,HD6870,500gb,W7 Ult x64
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 13th December, 2010, 01:44 PM
Chief Systems Administrator
 
Join Date: September 2001
Location: Europe
Posts: 13,075

Over a VPN? If so, then I suspect you also have issues with the way that name resolution is configured. Windows does permit NetBIOS name lookups to occur over DNS - avoiding the issues that the old broadcast style lookups have. There isn't any reason why you can't use UNC (\\server) style lookups across different networks as long as you have name lookups sorted.
__________________
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 13th December, 2010, 06:23 PM
Gizmo's Avatar
Chief BBS Administrator
BassTeroids Champion, Global Player Champion, Aim & Fire Champion, Puzzle Maniax Champion, Othello Champion, Canyon Glider Champion, Unicycle Challenge Champion, YetiSports 9: Final Spit Champion, Zed Champion
 
Join Date: May 2003
Location: Webb City, Mo
Posts: 16,178
Send a message via ICQ to Gizmo Send a message via AIM to Gizmo Send a message via MSN to Gizmo Send a message via Yahoo to Gizmo Send a message via Skype™ to Gizmo

Aidan's right; if your client is running over a VPN and the VPN and network name resolution are properly configured, then you should be able to ping the server by either NetBIOS or DNS name and it should work just fine, meaning that you should also be able to map network resources using \\servername\resourcename format.

If you can't, then you need to investigate the name resolution configuration.

If you have a configuration where they are logging onto the VPN AFTER they log onto the local workstation (like they run the Cisco VPN client when the login), well that's gonna be a bit different problem because you aren't going to have a connection to the server at the point where the logon script runs.

Last edited by Gizmo; 13th December, 2010 at 06:25 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 20th December, 2010, 10:51 AM
Rondog's Avatar
Member
 
Join Date: January 2005
Location: Victoria, Australia
Posts: 3,298
Send a message via MSN to Rondog

No VPN, terminal server user only. Port 3389 is open to the firewall.

Remote user starts PC, logs into local account, runs Remote Desktop Connection, types in the public IP of the Internet connection that has the server running. Connects. Which is where my problem lies, a remote user not apart of the local network with no VPN connectivity. Which means, no DNS so \\server doesnt exist (as far as the remote workstation is concerned anyway).
__________________
AOA Team fah

Rig 1: Intel Core i5 750,4gb,HD6870,500gb,W7 Ult x64
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 20th December, 2010, 10:57 AM
Rondog's Avatar
Member
 
Join Date: January 2005
Location: Victoria, Australia
Posts: 3,298
Send a message via MSN to Rondog

Sorry for the double post.

I have expressed to the customer they should go down the path a Netgear FVS318 at each end. But they arent really interested in spending $500 so 1 remote user in a TS session can print to their local printer.
__________________
AOA Team fah

Rig 1: Intel Core i5 750,4gb,HD6870,500gb,W7 Ult x64
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Awaiting terminal freeze up. cloasters CRASHED! 31 11th April, 2012 10:53 PM
SMP Client update, current client expires July 4 ThunderRd ThunderRd's AOA FOLDING@HOME Team 0 24th June, 2009 06:09 PM
Scripting Toro ThunderRd's AOA FOLDING@HOME Team 4 15th February, 2005 10:07 PM
The Terminal, with Tom Hanks. mookydooky Random Nonsense! 0 18th June, 2004 06:55 AM


All times are GMT +1. The time now is 02:03 AM.


Copyright ©2001 - 2010, AOA Forums
Don't Click Here Don't Click Here Either

Search Engine Friendly URLs by vBSEO 3.3.0