Link to home
Start Free TrialLog in
Avatar of sunilcomputer
sunilcomputerFlag for India

asked on

NET USE command using Telnet

Using Telnet I connect to a machine on network. Connection  is OK.
I am using the command to map a network folder, as follows :-

NET USE S: \\server\abc /user:server\test1 /persistant:yes

The command executes sucessfully. Drive S: gets created. We can use that.

The problem are :-
  1. As I exits Telnet, S: disappears from that system.
  2. During the connection there was a red cross on S: before exiting Telnet. I don't need that.

I Don't want to use ADS.
I have to map the drive from CLI only.
Is there any script using which I can map any network folder to client machine, Silently & persistantly.

Regards
ASKER CERTIFIED SOLUTION
Avatar of Sam Panwar
Sam Panwar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jeff_trent
When using the /user switch, are you actually using the server name when you specify "/user:SERVER\test1" or are you using the domain name instead?

The proper syntax for this command requires using the domain name and not the server name.  Alternatively, if you're mapping a drive to a network share that exists on a server where your "test1" account already has privileges, you don't have to specify domain name or server name.  Try "/user:test1" instead.
Avatar of sunilcomputer

ASKER

Drive is Mapped Correctly. That is not the problem.
The Problem is It is Disappearing as I exists Telnet.
I just caught on that you're using a telnet session rather than the command line.  This IS your issue.  Commands in a Telnet session are not treated like commands issued from the local command line.  Active Telnet sessions only keep commands in cache for the duration of the session (as far as I know).

Is there any compelling reason that you're doing this through a Telnet session?
Because I can't visit all the machines (over 50) in the building one by one
Do you have any other remote access tools? Such as VNC? You could also pop a batch file on each machine just browsing the networking and using the C$ share.

However, the easiest thing would've just been to use ADS or something along those lines, granted I know you said you didn't want to do it.

Tell us what options you have available to you.
Are there no login scripts?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Well, Telnet is right out the window, so you'll have to decide on another solution.  If it were me, I'd do what dragon-it suggested and run an AT command on each PC to schedule a task.  You can drop a batch file on each PC via the C$ share as masnrock suggested, then use AT's network syntax to built the scheduled task on each PC.  This way, it minimizes your effort, as you only create the batch file once, and dump it to each PC.  Then you can create a batch file of your own with 50 lines of AT \\COMPUTERNAME to create the scheduled task.
Download telnet.zip file and you can also able to run some shell scripts.
the commands from VB. You can download a Telnet Client here that will show you how it is done and then build on it for your own purposes.

http://www.codearchive.com/list.php?go=0214

http://www.computing.net/cgi-bin/AT-search.cgi?mode=concept&search=Telnet&forum=Programming&sp=sp&x=0&y=0