Mount Disk Images programmatically with password
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.