-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't seem to work with Windows 10 Pro machines. #9
Comments
@cfayette First and foremost I really appreciate your words! The script is on my side exclusively running under Windows 10 Pro (tested all versions since 1709). So the issue is probably not the Windows edition you run it on. Concerning the 41301 error, I don't know what error this is but by a short search I found this. Please confirm if this is the error you are facing, but I assume it is. This might happen because the script still runs as the reconnect didn't happen (198.168.1.162 not reachable). This would go away as soon as the failed attempt threshold is reached. The screenshot you attached tells me that your machine
The dollar sign |
Hi Andreas,
Thanks, for the quick response. Yes, you are correct about the 41301. I'm
sorry, I didn't realize that was a Task Scheduler message only.
No, the "c" and also another one "e" are NOT administrative shares - I made
them, with just the letter so as to denote the root folder is where the
share was mapped. I'm familiar with the old C$ share(s)...
I am connecting to this mv-mysql machine successfully via a command window
and Windows Explorer, successfully, with no problems, but something is
throwing it off, when used via your script.
Here is more info:
Microsoft Windows [Version 10.0.17763.292]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\Users\chris>net use
New connections will be remembered.
Status Local Remote Network
…-------------------------------------------------------------------------------
OK U: \\tmad-pet130\C Microsoft Windows Network
OK V: \\tmad-pet130\E Microsoft Windows Network
OK W: \\mv-mysql\c Microsoft Windows Network
OK X: \\tmad-pet130\backup Microsoft Windows Network
OK Z: \\TMAD-PET130\PET130-4TB-bkp
Microsoft Windows Network
The command completed successfully.
I delete the W: share and then try it via your script using this syntax,
and it fails:
C:\Users\chris>net use w: /delete
w: was deleted successfully.
C:\Users\chris>net use
New connections will be remembered.
Status Local Remote Network
-------------------------------------------------------------------------------
OK U: \\tmad-pet130\C Microsoft Windows Network
OK V: \\tmad-pet130\E Microsoft Windows Network
OK X: \\tmad-pet130\backup Microsoft Windows Network
OK Z: \\TMAD-PET130\PET130-4TB-bkp
Microsoft Windows Network
The command completed successfully.
Here are the mappings, with the W: deleted:
[image: image.png]
Here is the task scheduler when I run your script without the W: mapping:
[image: image.png]
I use the script with all the mappings, to re-create the W: and it errors
out with the same dialog message I sent before:
Set srvCfg1 = createUncSrvConfig("tmad-pet130", Array("C", "E"),
Array("U:", "V:"), "yes", "", "")
' notice, with credentials and using the machine name below:
Set srvCfg2 = createUncSrvConfig("mv-mysql", Array("C"), Array("W:"),
"yes", "mv-mysql\chris", "xxx")
Set srvCfg3 = createUncSrvConfig("tmad-pet130", Array("backup",
"PET130-4TB-bkp"), Array("X:", "Z:"), "yes", "", "")
'add more server configurations here or remove them if needed [remove
srvCfg2 and srvCfg3 for single server configuration]'
srvConfigs = Array(srvCfg1, srvCfg2, srvCfg3)
Task Scheduler:
[image: image.png]
Your script:
[image: image.png]
Manual mapping in command prompt:
C:\Users\chris>net use w: \\mv-mysql\c /persistent:yes
The command completed successfully.
C:\Users\chris>net use
New connections will be remembered.
Status Local Remote Network
-------------------------------------------------------------------------------
OK U: \\tmad-pet130\C Microsoft Windows Network
OK V: \\tmad-pet130\E Microsoft Windows Network
OK W: \\mv-mysql\c Microsoft Windows Network
OK X: \\tmad-pet130\backup Microsoft Windows Network
OK Z: \\TMAD-PET130\PET130-4TB-bkp
Microsoft Windows Network
The command completed successfully.
Mapping showing in Win Explorer:
[image: image.png]
Does this help?
Thanks...
*Chris Fayette*
*Computer Specialist*
Tangipahoa Mosquito Abatement District
15483 Club Deluxe Rd.
Hammond, LA 70403
*office*: (985) 543-0454, 7-3:30pm CDT, M-F
*fax*: (985) 543-0457
On Thu, Feb 7, 2019 at 12:29 PM Andreas Kar ***@***.***> wrote:
@cfayette <https://github.com/cfayette> First and foremost I really
appreciate your words! The script is on my side exclusively running under
Windows 10 Pro (tested all versions since 1709). So the issue is probably
not the Windows edition you run it on. Concerning the 41301 error, I don't
know what error this is but by a short search I found this
<https://answers.microsoft.com/en-us/windows/forum/windows8_1-performance/task-scheduler-cannot-start-a-task-error-0x41301/c0df9854-9fbf-4b76-b4fc-ad931e048d11>.
Please confirm if this is the error you are facing, but I assume it is.
This might happen because the script still runs as the reconnect didn't
happen (198.168.1.162 not reachable).
The screenshot you attached tells me that your machine 198.168.1.162 is
not reachable for some reason. Do I understand right that the mapping does
work on other drives/machines but just failed with 198.168.1.162? But I
think I'm already seeing the issue. Am I right that you want your remote
computers (MySQL machine) C drive to be mapped on W:? In that case you
have to specify the line as follows:
Set srvCfg2 = createUncSrvConfig("198.168.1.162", Array("c$"),
Array("W:"), "yes", "", "")
The dollar sign $ is crucial for the mapping - called administrative
share. Also you have to make sure that you can manually establish a drive
share to the administrative share because as far as I know out of the box
this doesn't work with a Win 10 Pro machine (as the source of the drive)
limited by some security policies. I'm also not sure if you used the right
subnet are you really using 198.168.x.x this might also be the source of
the problem. Let me know if this solved it for you.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Amnt035zdlxseEgLKLyxsLB7pEj18_aXks5vLHCRgaJpZM4an1ns>
.
|
@cfayette It will take me a bit to read everything through but in the meanwhile can you please send me again the whole mail directly to [email protected] because I see there are images included which aren't correctly added to the issue comment and in the Github mail I received. That would make it a lot easier for me while investigating the problem. Thanks in advance. |
@cfayette And as an addition. You don't have to create two configurations for one machine like Set srvCfg1 = createUncSrvConfig("tmad-pet130", Array("C", "E"), Array("U:", "V:"), "yes", "", "") '
Set srvCfg3 = createUncSrvConfig("tmad-pet130", Array("backup", "PET130-4TB-bkp"), Array("X:", "Z:"), "yes", "", "") you can combine them into one configuration like this: Set srvCfg1 = createUncSrvConfig("tmad-pet130", Array("C", "E", "backup", "PET130-4TB-bkp"), Array("U:", "V:", "X:", "Z:"), "yes", "", "") It is not mandatory to combine them into one config, however it is more performant for the script to do so. This is not limited to any amount of shares and drives per config, you can use as many as you want. It is just limited to one config per machine. So the host |
@cfayette What you can additionally try is to check what the output of the MsgBox(getNetUseCmd(srvConfig, j)) Simply add this line to L519 directly above It should then look something like that: MsgBox(getNetUseCmd(srvConfig, j))
If ctn = 0 Then |
|
That's good to hear and I will make the change to all four in just one statement. Yes, just the host and the 'mv-mysql' doesn't work with the script. |
Ok, I added the msgbox code for the net use. All of the mappings showed just fine, except for the 'mv-mysql' one. It didn't show the msgbox, just displayed the "finished" msgbox showing the connection server as being "offline". |
@cfayette Ok this is what I already assumed. Your device |
@cfayette Try if you can ping your device both with ip and hostname. I assume this won't work. If this works I will have to take a deeper investigation or provide you with a modified version of the script to test without ping. Maybe I have to modify the script to include another configuration option. |
That's it! Neither the IP address, nor the host name will allow ping. I've got to go for now, but I'll open up ICMP on that machine, tomorrow morning and try it all again. Thanks, again for such a cool script! |
@cfayette Take your time and don't worry. Just let me know when you've tested so that I know it is fixed. Additionally, I release a new version - v1.3.8 is out now. I added a new script parameter called However it is still advised to keep the script ping enabled if you can modify the server configuration because if I remember right I really appreciate your words, patience and help on improving the project. Thanks. PS.: sorry on that administrative share thing but it is often a bit hard to know what the intention is when just seeing the parameters of the script so I'm just iterating over the most likely causes of a connection issue by probability :). |
Hey man, as soon as I opened up ICMP, it worked great!
Thanks...
*Chris Fayette*
*Computer Specialist*
…On Thu, Feb 7, 2019 at 5:07 PM Andreas Kar ***@***.***> wrote:
@cfayette <https://github.com/cfayette> Take your time and don't worry.
Just let me know when you've tested so that I know it is fixed.
Additionally, I release a new version - v1.3.8 is out now
<https://github.com/thexmanxyz/network-share-reconnecter/releases/tag/v1.3.8>.
I added a new script parameter called pingEnabled and updated the README
to point on this issue. With this parameter it is now possible to globally
disable all script ping execution. This is especially useful when you don't
want to change the firewall rules or have no control over the server that
doesn't support ping.
However it is still advised to keep the script ping enabled if you can
modify the server configuration because if I remember right net use is
terrible slow when the share / machine isn't reachable. Therefore I also
integrated the ping checks in the first place because they can be easily
cancelled after a timeout, which isn't possible for net use.
I really appreciate your words, patience and help on improving the
project. Thanks.
PS.: sorry on that administrative share thing but it is often a bit hard
to know what the intention is when just seeing the parameters of the script
so I'm just iterating over the most likely causes of a connection issue by
probability :).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Amnt08U-9euqRbOKHQpaguz-S3IFdV4cks5vLLHKgaJpZM4an1ns>
.
|
Great, that you added the flexibility for this ping issue, in a new
release. (I didn't mean more work for you ;)) I'll check it out in a
bit. I agree that all of the network calls, that have to wait on that
time-out, are a pain - like net use for example.
No, problem on my help. Most folks, probably don't care, but I have been
looking for a script like this for a couple of months now, and I stumbled
across yours and saw the effort that you had put into it. It's really
appreciated, even if I may be the minority. Glad, to help improve the
project. I hadn't really thought about using the Task Manager tool, as the
mechanism to run the process. Actually, as a side benefit to my just
learning more about scripting, I hadn't really fooled around with the
Triggers before, and you have peaked my interest.
No problem on the administrative share stuff. I'm an old NT'er, so been
around a while. Back, in the day, I have actually written Microsoft
Certification Exam test questions for the old "Microsoft Certified
Professional" series...
Thanks again.
Thanks...
*Chris Fayette*
*Computer Specialist*
…On Thu, Feb 7, 2019 at 5:07 PM Andreas Kar ***@***.***> wrote:
@cfayette <https://github.com/cfayette> Take your time and don't worry.
Just let me know when you've tested so that I know it is fixed.
Additionally, I release a new version - v1.3.8 is out now
<https://github.com/thexmanxyz/network-share-reconnecter/releases/tag/v1.3.8>.
I added a new script parameter called pingEnabled and updated the README
to point on this issue. With this parameter it is now possible to globally
disable all script ping execution. This is especially useful when you don't
want to change the firewall rules or have no control over the server that
doesn't support ping.
However it is still advised to keep the script ping enabled if you can
modify the server configuration because if I remember right net use is
terrible slow when the share / machine isn't reachable. Therefore I also
integrated the ping checks in the first place because they can be easily
cancelled after a timeout, which isn't possible for net use.
I really appreciate your words, patience and help on improving the
project. Thanks.
PS.: sorry on that administrative share thing but it is often a bit hard
to know what the intention is when just seeing the parameters of the script
so I'm just iterating over the most likely causes of a connection issue by
probability :).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Amnt08U-9euqRbOKHQpaguz-S3IFdV4cks5vLLHKgaJpZM4an1ns>
.
|
@cfayette Sorry for my late answer but as it wasn't that urgent I took my time :). I assume everything works now? No problem. Don't worry, if there is a useful feature which isn't that much work to implement and also provides some benefit for other people it's definitively worth it. There are still bigger requirements left open which I currently don't have the time for (configuration application, auto install, ...). It might also be useful to transfer the whole project into another more sophisticated solution (tray app) which allows to manage network machines and their shares at one spot. However, for this project I initially decided to make it more simple with a VB script to get familiar with the language and as it is comfortable to use across many Windows versions without the need to install any sort of runtime. Basically just the script is mandatory. Every input is great because it helps to improve the functionality / code and also reveals usage scenarios and problems which I didn't consider in the first place ;). But I'm really glad that you found a solution for your needs and that the script helps you. I created the script because I was really pissed by the Windows default behaviour and there is not really a good alternative solution available which also works fast. Most solutions are slow if you have multiple drives from different machines, e.g. if one is offline. You will run into terrible long timeouts which completely kills the actual benefit. The main objective was to guarantee that the reconnect happens as fast as possible and doesn't get blocked too long by timeouts of machines / drives. The Task Scheduler is a great tool especially to hook on specific OS events. It's definitively worth a look because many things can be automatised with it and are kept hidden in the background. Great that I peaked your interest because it is really useful for many things. Well then you are already quite long around and experienced. I used NT but my knowledge and experience back then was quite tiny. Many people don't even know that there is something like an administrative share :D. You are very welcome, if you have any further questions, feel free to open another issue! |
Thanks, again, for your efforts! They are much appreciated. I use this
script at least once per day :)
Thanks...
*Chris Fayette*
*Computer Specialist*
Tangipahoa Mosquito Abatement District
15483 Club Deluxe Rd.
Hammond, LA 70403
*office*: (985) 543-0454, 7-3:30pm CDT, M-F
*fax*: (985) 543-0457
…On Tue, Feb 12, 2019 at 4:52 PM Andreas Kar ***@***.***> wrote:
@cfayette <https://github.com/cfayette> Sorry for my late answer but as
it wasn't that urgent I took my time :). I assume everything works now?
No problem. Don't worry, if there is a useful feature which isn't that
much work to implement and also provides some benefit for other it's
definitively worth it. There are still bigger requirements left open which
I currently don't have the time for (configuration application, auto
install, ...).
It might also be useful to transfer the whole project into another more
sophisticated solution (tray app) which allows to manage network machines
and their shares at one spot. However, for this project I initially decided
to make it more simple with a VB script to get familiar with the language
and as it is comfortable to use across many Windows versions without the
need to install any sort of runtime. Basically just the script is mandatory.
Every input is great because it helps to improve the functionality / code
and also reveals usage scenarios and problems which I didn't consider in
the first place ;). But I'm really glad that you found a solution for your
needs and that the script helps you. I created the script because I was
really pissed by the Windows default behaviour and there is not really a
good alternative solution available which also works fast. Most solutions
are slow if you have multiple drives from different machines, e.g. if one
is offline. You will run into terrible long timeouts which completely kills
the actual benefit. The main objective was to guarantee that the reconnect
happens as fast as possible and doesn't get blocked too long by timeouts of
machines / drives.
The Task Scheduler is a great tool especially to hook on specific OS
events. It's definitively worth a look because many things can be
automatised with it and are kept hidden in the background. Great that I
peaked your interest because it is really useful for many things. Well then
you are already quite long around and experienced. I used NT but my
knowledge and experience back then was quite tiny. Many people don't even
know that there is something like an administrative share :D.
You are very welcome, if you have any further questions, feel free to open
another issue!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Amnt07EpsjEGAgfWMj57dyigr7cY8bvMks5vM0WYgaJpZM4an1ns>
.
|
@cfayette You are welcome! |
First, of all, Andreas, thanks for writing a very cool script. I have one of my test machines is running MySQL and I have a dedicated drive mapping to it, as well as to other server machines. The server machines map just fine with this script, however the W10Pro machine does not and generates a 41301 error. I'm mapping the drives from my Windows 10 Pro for Workstations machine. Here, is a pic of the dialog box generated...
Here are some of the configs I've tried:
rem Set srvCfg2 = createUncSrvConfig("mv-mysql", Array("C"), Array("W:"), "yes", "mv-mysql\chris", "xxx")
rem Set srvCfg2 = createUncSrvConfig("198.168.1.162", Array("C"), Array("W:"), "yes", "", "")
Any ideas? Thanks...Chris
The text was updated successfully, but these errors were encountered: