Jump to content
Macro Express Forums
Gerry Peters

Establish Connection To Networked Hd's

Recommended Posts

i've created a macro that automates my backup procedure for 4 computers all on a network. My backup software is on an XP computer. Before I run the backup program I have to open the "My Computer" window and one by one select each mapped networked drive and hit "enter", which opens a separate window and establishes connection to that network drive. I then close that window and go to the next drive and so on.

 

After I've done that for all networked drives drives. I close "My Computer" window and go to the Start button (with a mouse movement) hit home to go to the top of the Start menu and use the arrow key to select a "Shortcut" (which has some command lines) to my backup program

 

This Macro works about half the time. What fouls things up is the inconsistant way "My computer" window operates. After selecting the first networked drive sometimes the selection stays on that drive and other times, the window flickers and the selection moves to another location, usually the top of the window. Win98 didn't require me to manually establish connections to each drive, but XP does.

 

My question: Is there a way to get XP to find all of my mapped networked drives in possibly one command or at least in a consistant predictable way. (I don't start my computers in the same sequence every day).

 

GP

Share this post


Link to post
Share on other sites

Gerry,

Have you tried Start/Run and then type in the server name, //servername/share

 

Also, if you have Remote Connection turned on you can get to the server that way. It's a one box input html page that you enter the server name in and press enter. The next screen will be the sever logon where you'll enter your username and pswd.

 

Hope this helped.

Robert

Share this post


Link to post
Share on other sites

Thanks Robert. A few questions:

 

>>Start/Run and then type in the server name, //servername/share<<

 

I think you may be on to something, but I can't get it to work. One of my computer's network name is XP1600 and the sharename for the C drive is C. So according to your instructions I chose Start/Run and typed //XP1600/C and then hit enter. I got an error message. Apparently I don't understand your //servername/share

 

>>Also, if you have Remote Connection turned on <<

 

how do I turn it on?

 

>> It's a one box input html page that you enter the server name in and press enter. <<

 

in my case what would the server name be?

 

Thanks,

GP

Share this post


Link to post
Share on other sites

Thanks Kevin.

 

I added the Network Connection command to my macro. I used that command for all of my 10 mapped drives. In other words 10 entries in the Scripting Editor, one for each drive. When I executed the command I got an error message "failed" saying that drive was already mapped. I have drives already mapped and the macro simply tried to remap them.

 

In the network Connection dialog box I first selected the drive letter to be mapped, then the network path and checked "display connection status". It seems the checkbox that says "list currently mapped drives" doesn't do anything, just gives you a display while filling in the box.

 

Should I check "make connection permanent" and go to Wndows Explorer and disconnect all mapp ed drives andlet macro express connect them at startup or should I use the network Connection command to first disconnect all mapped network drives and then issue a command to connect them?

Share this post


Link to post
Share on other sites

Gerry,

 

If I am not sure whether or not a drive letter is already mapped, I do a Network Disconnect and then a Network Connect. By the way, I also use this technique when using batch files to make network connections.

 

It seems the checkbox that says "list currently mapped drives" doesn't do anything, just gives you a display while filling in the box.
Yes, this is information only. It just shows which drive letters have already been mapped.

 

Should I check "make connection permanent" and go to Wndows Explorer and disconnect all mapped drives and let macro express connect them at startup
Macro Express tells Windows to map the drives on startup. Whether you use Windows Explorer or Macro Express to map a permanent drive, the result is the same.

 

should I use the network Connection command to first disconnect all mapped network drives and then issue a command to connect them?
That is what I would do. You can disconnect any drive, even those that have previously been mapped with "make connection permanent".

 

The macro would look something like this:

Network Disconnect: M:
Network Connect: M: to \\server-xyz\htdocs
Network Disconnect: N:
Network Connect: N: to \\server-xyz\In
Network Disconnect: O:
Network Connect: O: to \\server-xyz\inout
Network Disconnect: P:
Network Connect: P: to \\server-xyz\private

Share this post


Link to post
Share on other sites

This Network Connection command sure is quirky. I inserted a Network Disconnect command for each mapped drive at the begiinning of my macro and when I ran the macro, every disconnect command failed with an error message. Then every Network Connect command failed after that.

 

I then opened "my Computer" and selected the D drive of each networked computer and hit enter, which opens a window and establishes a connection to that drive. I then ran my macro again and the only drives that successfully disconnected this time were the D drives that I selected in My Computer. All the other ones failed to disconnect. Then every Network Connect command failed after that including those D drives.

 

In your example you listed:

Network Disconnect: M:

Network Connect: M: to \\server-xyz\htdocs

Network Disconnect: N:

Network Connect: N: to \\server-xyz\In

Network Disconnect: O:

Network Connect: O: to \\server-xyz\inout

Network Disconnect: P:

Network Connect: P: to \\server-xyz\private

In my macro I started it with disconnects for each mapped drive and then followed that by connects with the mapped drives. I'm not sure whether that would make any difference. I also have been checking the box "display connection status".

A long time ago I set up mapped drives using Windows Explorer and so every time the computer starts those mapped drives show up in Explorer even if the computers aren't turned on. I wonder if my problems are due to setting up the mapped drives in Windows Explorer instead of using "make connection permanent".check box. Would that make any difference?

 

If I were using Win98 I wouldn't be having this problem, I'm not sure why the defaults for XP networking have this limitation. It seems you've done this Network connect and disconnect successfully. Are you using XP?

 

Any further suggestions?

 

GP

Share this post


Link to post
Share on other sites

I am using Windows XP Pro with simple networking disabled. Some of the Network Connect commands in the example macro have 'Make Connection Permanent' checked while others do not. One thing that I had to do was to enter my login name and password. When I left 'Use Default Name and Password' checked, the connections failed.

 

Once I tested the macro and made sure it was working I unchecked 'Display Connection Status' in all the Network Disconnect and Network Connect commands.

 

You probably don't care if the Network Disconnect fails because the most likely cause of failure is that the drive wasn't mapped in the first place. So, if it fails it doesn't matter, and if it doesn't fail, then the drive is removed. Either way, the drive mapping is gone.

Share this post


Link to post
Share on other sites

>> using Windows XP Pro with simple networking disabled.<<

 

I have a a default XP Pro installation with very few tweaks. I did install as "Standard Computer" by hitting F5 (or F6?) during installation. If I recall, I didn't really do anything for establishing Networking between my 4 computers other than set all drives for "sharing" so I'm not sure what you mean by "simple networking disabled". I just share drives and printing and since it's only me, I have no logins or passwords or other users other than me, which I guess would be considered Administrator.

 

 

 

>>One thing that I had to do was to enter my login name and password. When I left 'Use Default Name and Password' checked, the connections failed.<<

 

When I boot my computer it goes straight to desktop. When I installed XP, I didn't choose a login password, I just hit "enter", so I wouldn't have a login and password at boot up. So as far as me entering my login name and password, I suppose I really don't have one, but I did try a few like for login name: Administrator, Default User, Gerry Peters and for password with blank or "spacebar". I tried every combination fo those in the "Network Connection" dialog box of Macro Express with fails for both disconnect and connect mapped Network drives "Access denied" was the error message for Network connect.

 

So you have any more clues to getting this to work? What about "simple networking disabled"?

Share this post


Link to post
Share on other sites

Gerry,

 

After a Google search I learned that the correct name of this option is "Use Simple File Sharing". For XP Home, this is the only option. For XP Pro, it is enabled by default. For a brief description of what 'Simple File Sharing' is and how to change it, visit this web page: http://compnetworking.about.com/cs/winxpne...ht/winxpsfs.htm

 

Microsoft has this option off by default and where you change the option it is described like this: "Use Simple File Sharing (Recommended)"

 

In spite of Microsoft's recommendation, I have read several articles that say Simple File Sharing should be disabled. You say

I just share drives and printing and since it's only me, I have no logins or passwords...
The authors of the above mentioned articles would probably point out that, since you connect to the Internet, you share your computer with every other person on the Internet and thus should turn off Simple File Sharing.

 

At this time I do not know why you cannot just select the 'Use Default Name and Password' option to make a connection on a network with Simple File Sharing enabled. We will research the issue.

Share this post


Link to post
Share on other sites

When I first changed to "simple file sharing", my test macro worked just one time. Successfully disconnecting and then connecting a mapped drive. I looked at my settings and saw I had "Gerry Peters" for Login name and password was blank. I switched to use default name and password checked and it failed every time. When I switched back to "Gerry Peters" as the Login name it continud to fail.

 

These are the messages when it fails:

 

Network Disconnect failed

 

Network Connect failed

Map failed access to network device was denied

 

 

A have 2 test macros one involves a simple disconnect and connect of a networked Win98 computer the other test macros has all my mapped drives, which are one XP computer and 2 Win98 computers. I'm doing the testing on an XP computer since that's the one that has the backup software

 

Using a 3rd test macro with an XP computer as the Netwroked drive with "simple file sharing disabled" it still fails with different error messages.

 

Network Disconnect

Drive mapped successfully

 

Network Connect failed

Map failed The specified drive is already assigned to another network device

 

Any more ideas on getting this to work?

 

I wonder if I should instead use something on the line of Robert's suggestion Start/Run and some command to find the networked computers. He must be real busy, he didn't respond to my email

 

Thanks for all your help

 

Gerry Peters

Share this post


Link to post
Share on other sites

Gerry,

 

Use the "Net Use" command at a Command Prompt (or MSDOS prompt):

 

Syntax:

Net Use [devicename | *] [\\computername\sharename[\volume] [password | *]

[[/DELETE] | [/PERSISTENT:{YES | NO}]]

 

To map a drive letter with a non-persistent connection:

Net use v: \\Insight-server\c

 

To map a drive letter with a persistent connection:

Net use v: \\Insight-server\c /persistent:yes

 

To disconnect a drive

Net use v: /Delete

 

Command Help:

To view help for the Net Use command type "Net Use ?" at a Command Prompt.

 

 

Enter a Net Use command in either a command prompt or the Run dialog.

Share this post


Link to post
Share on other sites

Kevin, I think you're on to something. I was able to get those commands to work. I used the commands in a Start/Run dialog.

 

I opened My Computer and noticed on all my mapped drives under "Type" was listed either Disconnected Network Drive or Network Drive. If I double click on a Disconnected Network Drive then the "Type" changes to Network drive

 

 

At the Start/Run dialog box, I typed:

Net use r: /Delete

 

I got a Dos screen asking me if I wanted to disconnect.

I typed "Y"

I noticed in My computer after I hit F5 to refresh, that drive was now listed as Disconnected Network Drive

 

It worked!

 

Then at the Start/Run dialog box, I typed:

Net use r: \\Xp1600\c /persistent:yes

I noticed in My computer after I hit F5 to refresh, that drive was now listed as Network Drive

 

So it all worked, now I've run into a snag trying to put together a macro. I tried

Scripting Editor/System/Run Dialog window (I tried Find Computers and Run programs) and then Text/Text type, in which I typed

Net use r: /Delete

 

When I run this macro, the Start Run dialog window does open but no text is inserted. I've tried several things including "Launch/Activate Program all with no avail, "wait for text"

 

We're close. Let me know how I can finish this macro.

 

GP

Share this post


Link to post
Share on other sites

I can't say why the Run dialog is not accepting text input. Perhaps it does not have focus or the 'cursor' is not in the field?

 

You may have better luck using a batch file. Put the net start commands in a text file with a .bat extension. Then use the Program Launch command to run it.

Share this post


Link to post
Share on other sites

>>I can't say why the Run dialog is not accepting text input. Perhaps it does not have focus or the 'cursor' is not in the field?<<

 

When I created the macro from scratch, it worked. Thanks for all your help. I really like the program and the tech support, despite a few quirks

 

Gerry Peters

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...