at the moment I'm creating a bunch of VBScripts partially for standalone use, partially for use as sections of longer Scripts for several Tasks of System administration for my workplace.
I have now one for connecting with one of our Network Drives to use on every PC except the Central-PC.
The Script itself seems to be working correctly, but it delivers the error messsage which should display if the connection fails.
So I'm looking for help, but please don't judge the general Scripting, it should be at this point not more than the skeletal structure and works as an early draft.
I will attach this special part of the complete project, I was talking about.
At least I hope someone is able to help me, so I can get further with the whole project!
(I attach the files as .txt, because below is written .vbs can not be attached. (Be indulgent with me, this is my first post here! ))
Greetings
Lobas538
Last edited by Lobas538; Apr 24th, 2018 at 02:26 PM.
at the moment I'm creating a bunch of VBScripts partially for standalone use, partially for use as sections of longer Scripts for several Tasks of System administration for my workplace.
I have now one for connecting with one of our Network Drives to use on every PC except the Central-PC.
The Script itself seems to be working correctly, but it delivers the error messsage which should display if the connection fails.
So I'm looking for help, but please don't judge the general Scripting, it should be at this point not more than the skeletal structure and works as an early draft.
I will attach this special part of the complete project, I was talking about.
At least I hope someone is able to help me, so I can get further with the whole project!
(I attach the files as .txt, because below is written .vbs can not be attached. (Be indulgent with me, this is my first post here! ))
Greetings
Lobas538
Hey I hope this helps you... if you have some problem pls let-me know...
Things that i know:
I won't be able to map a network driver if already exist that's not gonna happen...
only if you set a different letter.
Logics: (pipeline "|" is for visual propose)
If Driver letter is available then -> map the network Driver.
| If is it not successful then -> tell the user.
else
| If I am already connected then -> tel the user that I'm already connected.
| elseif I'm not already connected then -> tel user to choose other letter.
end if
Functions:
isDrvLttrAvail -> Return boolean -> check if letter is available.
mIAlreadyCon -> Return boolean -> check if I am already connected.
isItSuccessfull-> Return boolean -> check if was successful accomplished.
Subroutines:
MapNetwork -> THE MAGIC BECOMES TRUE...
stWentWrong -> Print on screen that something went wrong...
alreadyConnected-> P... ... You already have connection to this Network path...
chooseOtherLetter-> P... ... Choose another Letter this one is already in use...