Re: virtual drive

On Wed, Jun 15, 2011 at 8:49 AM, Irfan Sayed <irfan_sayed2002@xxxxxxxxx>wrote:


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


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.



Relevant Pages

  • Re: newbe about API
    ... Emne: Re: newbe about API ... > I found all these API-CALL strings are finally compiled to ... more than that...and Windows simply takes this to an extreme that this ... DLL, when a weak point is found (which, with Microsoft, is something ...
  • Re: In the Shallow End
    ... When a document claims how an API is supposed to be used and then gives the user examples that actually work, ... Vague in your instance means you have no context to VMS or UNIX of that era. ... Windows offers lots of this stuff. ... That's why Apple had to dump a whole paradigm to plunge ahead and take the lead. ...
  • Re: (2010) Beginner Question: Directory Lists
    ... further enhancement and that it's not going to be the official primary developement api for 3rd parties. ... all sorts of articles talking about how "the aging win32 api" ... It is the api that windows will be presenting in the future. ... Metro apps will most likely run on either windows 8 or wp8 - but, not sure what web apps has to do with anything... ...
  • Re: a pre-beginners question: what is the pros and cons of .net, compared to ++
    ... as the windows forms architecture wraps a number of activex ... and retains backwards compatibility with both COM and the classic Win32 api. ... C++ cannot inherently do video capture either, since you have to import COM. ... Outlook or Word or IM programs, each of which would run in managed code ...
  • Re: Interpreting a BAS module
    ... unicode and ansi strings. ... applications make calls out to Windows to ask it to do something (e.g. ... you have to utilize an API that is designed to ... AddressOf is also used in subclassing. ...