Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: Checking Mapped Drives
Topic Summary:
Created On: 13-Aug-2007 19:14
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by Chris Jones, on Monday, August 13, 2007 9:21 PM

Answer:
You can use canOpenFile() to check if a certain file out there is available. Or create a Stat of your code's folder and check for null.....

Do you already have the rest of this system planned out? I.e., are you going to use a trigger to copy the files over, etc.? I'd be interested in what you come up with.

Chris
 13-Aug-2007 19:14
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

Just curious if anyone knows if there is a way to check if a network drive is available?

Here's the issue, all of my DXL scripts are currently stored off on a mapped network drive along with baseWindowMenu.inc, formal.dxl and Explorer Popup Menu.inc.  This way I can update menus and scripts without having to push the change out to everyone (logistical nightmare, considering the number of laptops and then coordinating with IT).

Occassionally, we have users that will work from home, and the network drives do not map properly, this happens sometimes in the office as well.  When this happens they can not access the above scripts, which means that DOORS will not startup.

Hence what I would like to do is:

- During startup, check if the network drive is available.
- If it is, then copy all the scripts to the local computer, but use the network scripts.
- If it isn't, then use the scripts on the local computer (which should have been copied over from the last successful connection to the network drive).  Probably should pop a message box notifying the user that the script may be out of date.

Any ideas how I check if the drive is mapped????

Thanks,

Scott

-------------------------
Scott Boisvert
Engineering Tools Administrator
L-3 Communications - Avionics Systems
scott.boisvert@l-3com.com
Report this to a Moderator Report this to a Moderator
 13-Aug-2007 20:07
User is offline View Users Profile Print this message


Chris Jones

Posts: 177
Joined: 1-Jul-2005

Answer Answer
You can use canOpenFile() to check if a certain file out there is available. Or create a Stat of your code's folder and check for null.....

Do you already have the rest of this system planned out? I.e., are you going to use a trigger to copy the files over, etc.? I'd be interested in what you come up with.

Chris
Report this to a Moderator Report this to a Moderator
 13-Aug-2007 21:05
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

Here you go.

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
 13-Aug-2007 21:32
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

Thanks,

Just what I was looking for.  Much easier than trying to implement the VB script I was working on. lol.

Right now, I'm looking at just copying the files over at every successful login, with the network drive connected.  Once I get that working, I may start researching to see if a I can check to see if the file has been modified since the last login and then only copy it over then, but these files are so small I don't think it will hinder the load time if I copy them over on each successful connection.



-------------------------
Scott Boisvert
Engineering Tools Administrator
L-3 Communications - Avionics Systems
scott.boisvert@l-3com.com
Report this to a Moderator Report this to a Moderator
 15-Aug-2007 21:34
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

Chris,


Here's what I've come up with so far.  Just note the ***BLOCKED*** in the script are terms in our project that we are not allowed to use in public, so I "blocked" them.

We've modified some of the default scripts/include files so I check and copy those first (i.e. formal.dxl, baseWindowMenu.inc.)

Instead of copying the scripts over to the local computer every time they have a successful login with the network drive available (which could take a few minutes to copy all the files), I check the modified date on the local copy and the network copy.  If they differ I copy the network copy over the local copy.

I also create the directory structure if it doesn't exist prior to copying anything over.

It probably still needs some work, and I had to modifiy some of the "local" copies of the scripts to point to the local copy instead of the network copy, but it seams to be working right now.

***EDIT***

Forgot to add,

I call this script via an include statement in the init.dxl script located in DOORSHOME/lib/dxl/.



-------------------------
Scott Boisvert
Engineering Tools Administrator
L-3 Communications - Avionics Systems
scott.boisvert@l-3com.com

Edited: 15-Aug-2007 at 21:46 by Scott Boisvert
Report this to a Moderator Report this to a Moderator
 16-Aug-2007 01:08
User is offline View Users Profile Print this message


Chris Jones

Posts: 177
Joined: 1-Jul-2005

Wow, that's very nice. Thorough too. It looks like you've set up a system similar to what we use (copy files over, etc.). It works pretty well.

How are you deploying this initially to users? That is, how are you getting them the modified init.dxl to bootstrap? We've implemented a global post-open trigger that first checks the version they have (just a registry key that we set up) and copies bootstrap stuff over if need be. So on the first run of DOORS they get a message when they open a document that asks them to log out and back in (at least it's easier than having them run something). Stuff like formal.dxl gets copied over every time so that if we add a new script they can see it "immediately." The only other real drawback is if someone uninstalls and then re-installs DOORS, they still have our custom registry "version" setting. I suppose there are a few things we could do to remedy that also, if I had the time!

Chris
Report this to a Moderator Report this to a Moderator
 16-Aug-2007 13:08
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

Well I haven't deployed it yet.  But my plan is to put a similar check and copy in the network copy of the the baseWindowMenu.inc.  So the next time they start DOORS, they'll have the new init.dxl script.  I guess I could always have our IT department push it through Unicenter, but that just a pain in the arse. 

As far as new installations go, our IT, like most, use images and I had them update their image with the modified files that point to the files I have out on the network drive, like the baseWindowMenu.inc and formal.dxl.  So I don't have to worry about new installs anymore.  Got really annoying when folks would call me saying "I don't see the menu you were talking about....".

I actually like keeping my formal.dxl out on the network drive and just having the client point to that one.  This way if I update anything in there it is available the next time they open a module and they don't have to log out of DOORS to see the change.  Things on the Explorer menus, though still need a client restart, but it's better than trying to get everyone to copy the file over. lol.  I guess technically I don't really need to have them connect to the network copies anymore, considering they'll have a fresh copy on their local drive every time they log on.



-------------------------
Scott Boisvert
Engineering Tools Administrator
L-3 Communications - Avionics Systems
scott.boisvert@l-3com.com
Report this to a Moderator Report this to a Moderator
 16-Aug-2007 16:39
User is offline View Users Profile Print this message


Kevin Murphy

Posts: 206
Joined: 15-Jul-2005

It is my belief that you guys are all asking for trouble with the way you are setting up your configuration.

I worked in a similar environment where HOME was set to a network share...and clueless DOORS administrators had people patch their DOORS clients withouth updating the files on the network share!

You guys will have a case where you'll want to patch your users, but you'll have to ensure all your users have the patch before copying the files out to the drive. A coordination nightmare.

I am going to be presenting a white paper on this very topic at the User Conference in November.

In the mean time--you can check out Louie's code in this thread to see if a file/directory exists:

https://support.telelogic.com/en/doors/forums/messageview.cfm?catid=17&threadid=2903&STARTPAGE=1.

I urge you all to reconsider deploying base DOORS files on the network. Use projaddins and addins, but don't point basic DOORS client functions to network shares.

-------------------------
Kevin Murphy
http://www.baselinesinc.com
The Requirements Management Experts

Edited: 16-Aug-2007 at 16:47 by Kevin Murphy
Report this to a Moderator Report this to a Moderator
 16-Aug-2007 18:22
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

Key word here is "clueless".....

I'm not sure I see an issue.  Any patch we install has to be tested by and verified before it's pushed to the users.  That includes making what ever updates to the scripts that are necessary.  Hence the reason I have a "DOORS 8.1 Menus" directory, when we are ready to push the next iteration of DOORS I will create a "DOORS 8.x Menus" directory, dump my files in there for 8.x and then push the patch.  Who cares if there are few computers that don't get the patch right away, they're still connecting to the 8.1 files until the patch is installed.

SOOOOOOO....I'm really not sure I see your point to this being folly.  I can understand having the files sitting out on the network with out a backup if the network is down, which is why I wrote this script in the first place.

As long as my users can connect to the DOORS server, they have no issues.  If the network drive doesn't map correctly, they get notified and if they choose they can run with scripts that might be a day or two old.  But they have the option to quit and map the network drive as well.

Anyway, apparently my boss is cheap and won't budget the money for me to go to the conference, but I wouldn't mind persuing your white paper.  Maybe I'm just missing something here.

-------------------------
Scott Boisvert
Engineering Tools Administrator
L-3 Communications - Avionics Systems
scott.boisvert@l-3com.com
Report this to a Moderator Report this to a Moderator
 16-Aug-2007 18:57
User is offline View Users Profile Print this message


Kevin Murphy

Posts: 206
Joined: 15-Jul-2005

I understand that the keyword is "clueless," but who thinks they are clueless?

Keep in mind that after you leave, someone else has to figure out and maintainyour mess (if it IS a mess, assuming). Documentation isn't always in order, so the next person has to sift through the configuration and figure out what is going on.

If you know what you're doing, great! But I still say you likely won't be running that DOORS server forever.

And there may never be a way to know exactly what is I'm talking about, but once you've seen a few nightmare configurations, you'll know exactly.

The biggest one is that DOORS is patched locally, and a patch may change some of those base files. Running a client from C:\ with libraries from N:\ can cause problems (and I don't mean addins, I mean base files).

Good luck with your script. I'll be posting the white paper on my Web site after the conference.

-------------------------
Kevin Murphy
http://www.baselinesinc.com
The Requirements Management Experts
Report this to a Moderator Report this to a Moderator
 16-Aug-2007 19:17
User is offline View Users Profile Print this message


Scott Boisvert

Posts: 348
Joined: 14-Apr-2006

AAhhh....I see...

We don't patch computers, we patch an image and then push the image out.  So if the image is patched and updated correctly then there isn't an issue.  As far as documentation goes, I'm requried as much as I hate it to document everything I do or have done with DOORS.  I'm still in the process of cleaning up the mess that was left for me a year and a half ago.  I understand messes.....



-------------------------
Scott Boisvert
Engineering Tools Administrator
L-3 Communications - Avionics Systems
scott.boisvert@l-3com.com
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 2 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.