Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Scripting > Test if share is connected

Reply
Thread Tools Display Modes

Test if share is connected

 
 
Trond
Guest
Posts: n/a

 
      10-06-2009

I have this VBScript that is working just fine. It maps network drives
depending on users organizational unit and what groups he/she is in.

But every now and then i see that the script for some reason don't run
during logon and user will miss his U and P.

What would be the best approach to solve this? I am thinking about
creating a windows service that look for U: If it's not there it will
run login script from \\server\NETLOGON\VBScript.vbs

Or should I make a vbscript that I deploy to a specific folder on each
user's computer during login and then use Scheduler to run that every
now and then?

Maybe there is a switch I'm not aware of in VBScripting that makes a
mapping more persistent so that if its mapped then it will not be
removed unless I change script and delete it through that.

I hoped for some input on how to crack this one :-)
Best regards
Trond

 
Reply With Quote
 
 
 
 
Al Dunbar
Guest
Posts: n/a

 
      10-06-2009


"Trond" <> wrote in message
news:...
> I have this VBScript that is working just fine. It maps network drives
> depending on users organizational unit and what groups he/she is in.


A logon script. Is it run by GPO or because that's how you configure your
user accounts in AD?

> But every now and then i see that the script for some reason don't run
> during logon and user will miss his U and P.


That should be extremely rare if you have a robust and well-connected
network. When it happens, is the user simply logging on locally with cached
credentials? If a home folder/home drive is specified in AD, does the user
find it mapped?

> What would be the best approach to solve this?


Determine the cause of the problem, and attach that. Workarounds can be
developed, but they are generally adhoc in nature...

> I am thinking about
> creating a windows service that look for U: If it's not there it will
> run login script from \\server\NETLOGON\VBScript.vbs


What will it do if the server is not accessible? A network issue that
prevents the logon script could also prevent mapping shares.

Personally, I think that approach is a lot of work just to get things to
work the way they should. Then you have maintenance and support issues on
top of it all.

> Or should I make a vbscript that I deploy to a specific folder on each
> user's computer during login and then use Scheduler to run that every
> now and then?


Personally, I think that approach is a lot of work just to get things to
work the way they should. Then you have maintenance and support issues on
top of it all.

> Maybe there is a switch I'm not aware of in VBScripting that makes a
> mapping more persistent so that if its mapped then it will not be
> removed unless I change script and delete it through that.


In my experience, persistent mappings are not always persistent.

> I hoped for some input on how to crack this one :-)
> Best regards
> Trond
>


As I already suggested, your efforts might be better spent in determining
the problem and fixing it. Even if it is unfixable because it is something
out of your control, knowing the nature of the problem would likely help you
determine the most effective workaround. One thing you don't want to do is
to come up with a solution so seamless that you completely forget that there
is a problem out there.

So, what have you done to determine the cause?


When our users logon remotely, this is done in such a way that the domain
logon script does not run (they logon locally with cached credentials). We
have an application that runs in the background somehow along the lines of
your first idea. Sometimes it works, and sometimes the application fails to
run the script. I think that is because the app tries to run the script from
one particular computer that may not always respond quickly enough.

Anyway, my low-tech "solution" is to place a batch file on the all users
desktop on these systems that the users can run in the event of a problem.
This script finds an available DC and runs our standard logon script from
there. This works well for us, as it doesn't have to detect the problem,
just solve it. Users don't complain each time they need to use it, so
occasional problems I never hear about. But they do complain when they find
they have to run it most of the time, so I am alerted to problems that need
fixing.

/Al


 
Reply With Quote
 
Trond
Guest
Posts: n/a

 
      10-08-2009
On Tue, 6 Oct 2009 17:51:52 -0600, "Al Dunbar" <>
wrote:

>
>"Trond" <> wrote in message
>news:.. .
>> I have this VBScript that is working just fine. It maps network drives
>> depending on users organizational unit and what groups he/she is in.

>
>A logon script. Is it run by GPO or because that's how you configure your
>user accounts in AD?


It is run during login as a loginscript. The script is not added to
each users profile.
>
>> But every now and then i see that the script for some reason don't run
>> during logon and user will miss his U and P.

>
>That should be extremely rare if you have a robust and well-connected
>network. When it happens, is the user simply logging on locally with cached
>credentials? If a home folder/home drive is specified in AD, does the user
>find it mapped?


All users are connected to the server network through VPN. THe users
log on and report that sometimes they dont get U and P mapped. When i
look i can see domainserver\Netlogon so i wonder if i need to delay
the script maybe.

>
>> What would be the best approach to solve this?

>
>Determine the cause of the problem, and attach that. Workarounds can be
>developed, but they are generally adhoc in nature...
>
>> I am thinking about
>> creating a windows service that look for U: If it's not there it will
>> run login script from \\server\NETLOGON\VBScript.vbs

>
>What will it do if the server is not accessible? A network issue that
>prevents the logon script could also prevent mapping shares.

Yes i agree but the strange thing is that the network is never down
(or at least very rare). THere can be other users connected over the
same VPN that all are working as normal.

>
>Personally, I think that approach is a lot of work just to get things to
>work the way they should. Then you have maintenance and support issues on
>top of it all.
>
>> Or should I make a vbscript that I deploy to a specific folder on each
>> user's computer during login and then use Scheduler to run that every
>> now and then?

>
>Personally, I think that approach is a lot of work just to get things to
>work the way they should. Then you have maintenance and support issues on
>top of it all.
>
>> Maybe there is a switch I'm not aware of in VBScripting that makes a
>> mapping more persistent so that if its mapped then it will not be
>> removed unless I change script and delete it through that.

>
>In my experience, persistent mappings are not always persistent.

I agree. Wonder if i should look into KIXtart and see if there are
some "tools" there.
>
>> I hoped for some input on how to crack this one :-)
>> Best regards
>> Trond
>>

>
>As I already suggested, your efforts might be better spent in determining
>the problem and fixing it. Even if it is unfixable because it is something
>out of your control, knowing the nature of the problem would likely help you
>determine the most effective workaround. One thing you don't want to do is
>to come up with a solution so seamless that you completely forget that there
>is a problem out there.
>
>So, what have you done to determine the cause?
>
>
>When our users logon remotely, this is done in such a way that the domain
>logon script does not run (they logon locally with cached credentials). We
>have an application that runs in the background somehow along the lines of
>your first idea. Sometimes it works, and sometimes the application fails to
>run the script. I think that is because the app tries to run the script from
>one particular computer that may not always respond quickly enough.
>
>Anyway, my low-tech "solution" is to place a batch file on the all users
>desktop on these systems that the users can run in the event of a problem.
>This script finds an available DC and runs our standard logon script from
>there. This works well for us, as it doesn't have to detect the problem,
>just solve it. Users don't complain each time they need to use it, so
>occasional problems I never hear about. But they do complain when they find
>they have to run it most of the time, so I am alerted to problems that need
>fixing.


Yes i have added a shortcut to all users desktop they can click to map
the drives. But im not totally happy with that. Thats why i am trying
to see if its possible to do it a lil smarter. My guess is that there
might be a DNS thing even though im not convinced about that. As
mentioned all users are connected to a local network that is connected
to servers over VPN. THis can be the reason. I will try to delay the
script a lil so that computer is more "ready".
Thanks for your reply :-)
>
>/Al
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual PC cannot share network adapter when VPN is connected MattG Virtual PC 7 08-10-2009 09:25 PM
Who is connected to what share ? in SBS 2008 Gary D Windows Small Business Server 2 02-03-2009 03:42 PM
Do I have to be connected to the Internet to share files on a LAN? InnerCityTech Windows Vista Networking 2 11-09-2007 01:05 AM
How to determine the clients connected to a share Steve Williams Windows Server 1 04-15-2005 06:55 PM
VP Connected, saw the share but not cannot open it frankcvc Server Networking 3 11-27-2004 05:50 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59