• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Mount Disk Images programmatically with password
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mount Disk Images programmatically with password


  • Subject: Mount Disk Images programmatically with password
  • From: Lorenzo <email@hidden>
  • Date: Sat, 19 Apr 2003 21:21:07 +0200

The API FSMountServerVolumeSync mounts remotes volume very well.
And giving the user name and user password, it mounts the remote volumes
without asking for the user interaction. Fine.

This API doesn't work with Disk Images because they are like local volumes
(volParms.vMServerAdr is 0);

And even if I try to mount a diks image volume with
FSMountLocalVolumeSync(diskID, NULL, &vRefNum, 0);
it doesn't work too.

So I found the way to mount the disk image volumes using the AliasHandle and
resolving it later.
FSResolveAliasFile(&sourceRef, true, &isDirectory, &isAlias);

It works well. The problem is that if the disk image has been protected with
a password, and the password is not in the keychain,
this method requires the user interaction.
Instead the user wants to store the password earlier, so my application,
during the night can mount volumes and work quite.

So, how to mount a disk image programmatically, since I know only password
and its local pathname? e.g. /Volumes/DiskImageVolume

Any suggestion would be appreciated. Thanks.


Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: A pie analyzer
  • Next by Date: Prefix for statfs.f_fstypename
  • Previous by thread: Re: NSdata, buffer, NSData
  • Next by thread: Prefix for statfs.f_fstypename
  • Index(es):
    • Date
    • Thread