On Wed, Jun 15, 2011 at 8:49 AM, Irfan Sayed <irfan_sayed2...@yahoo.com>wrote:
> Hi, > > is there any way or module in perl to create the virtual drive in windows > lets say , i have to create M: mapped to c:\test > > so i can use command subst M: c:\test > > > but still , is there any better way > > regards > irfan > Hi Ifran, There should be a better way I am certain there is an API in Windows that allows you to do this programatically. What you would then need to do is call the API directly and avoid the command line mess. I am not sure if this API is documented (I believe so as I vaguely remember reading it several years ago), if it is you will find that it usually comes down to making a simple call to the API, though this will be via a external library so it will require some work and of course this is not something that will be very portable or for that mater simple to write. So please do look at CPAN to see if there maybe is already a module for this (I could not find one having just had a quick look) If there is no module for this yet please do share your implementation of this API (if you decide to go the proper way) with the rest of us as it would be very interesting to see how this is done. Regards, Rob