Geeks With Blogs

News Welcome to my blog, I hope to have here some interesting content for you all to read. However, I'm just starting out in this, so be patient with me.

Moshe Eshel The eye in the sky - just fell down

This is becomming a ranting blog, but actually today eventually turned out good.

Begin of day
1. Engineer at clients site reports a problem with installation, we start trying to reproduce - no luck, a little later a re-installation of the patch resolved the issue... Important client, good thing we didn't fail there..
2. Team leader assigns a new issue to me. Apparently a tool that we outsourced to a different company to develop was not behaving well. The tool does all kinds of IIS chores for us - defines new VDs etc... One of the chores is set NTFS permissions on the application folders. At some points it took over two hours to finish the process. Outsourcing company reply: “There were a lot of files.” Doing the exact same things from Windows UI took under a minute (not including navigating the UI which took two more minutes...) - Team leader to me: “Well, we have the source code of the tool, go fix it...”.

Makes you wonder why we outsourced it in the first place ;-)

Anyway, I look at the code, looks pretty straight forward - read the config XML file, for each folder apply settings. Using ADSI objects. I looked deeper into the code, and saw many deleting and setting. and decided that I'm not that proficient with the object and issues to optimize it and still be sure it performes the same. On to search for alternate options...

What I found after a little googling was fileacl.exe which I'm sure some of you already know. This is even distributed by MS link is to there. Unfortuneltely couldn't find authors' site to look up more information (only on google cache). Tested it for a while from the command line, after understanding saw that it worked exactly as I needed it, and much faster...

Opened up the source code of the utility again, this time modfied it to call the exe instead of executing with the other (slow) method, a little more work to convert the data from the XML to the correct switches for fileAcl - and were done.

First test, realised I was doing something wrong with the Full Control permission, fixed - DONE a two hour run now takes under a minute. Thank you Guillaume Bordier .

Also thank you ShellExecuteEx always trusty from MS.

Another day finished.

Posted on Wednesday, February 16, 2005 5:21 PM Work Related | Back to top


Comments on this post: My day at work

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Moshe Eshel | Powered by: GeeksWithBlogs.net