Automatically share mounted TrueCrypt volume?
April 9, 2010 7:05 AM   Subscribe

Is there a way to have Windows permanently share a drive letter, even when it's a mounted volume?

I use TrueCrypt to mount an encrypted volume and I want to permanently share that drive on my LAN. I'm able to share it just fine, but each time I reboot and mount the volume I have to manually reconfigure sharing. Is there a way to make Windows remember my share settings for a given drive letter? Barring that, is it possible to automate the process a bit (batch script, etc.)?

In my case I always mount the volume as drive T:\ and I'd like the T-drive to be permanently shared whenever it's present. Not sure if it matters, but Windows treats the TrueCrypt volume as a local drive as opposed to "removable media" like, say, a flash drive.

I'm running Win 7 Pro 64-bit, FWIW.

Thanks!
posted by jluce50 to Computers & Internet (4 answers total) 2 users marked this as a favorite
 
Best answer: You can share a folder from a batch file using something like (off the top of my head):

Net Share ShareName=C:\FolderToShare
Cacls C:\FolderToShare /e /g Everyone:F

That assumes you want to give everyone full control (otherwise use /g User:Permission, where Permission is one or more of R (read) W (write) C (change) and F (full))

The TrueCrype command-line reference for Windows is here.
posted by le morte de bea arthur at 7:20 AM on April 9, 2010


Response by poster: Net Share works great, but Calcs only sets the permissions locally (i.e. if I go to Security tab in the Properties dialog for T:). How do I set the Share permissions with Calcs (i.e. Sharing tab in Properties and then click Advanced Sharing)?
posted by jluce50 at 8:16 AM on April 9, 2010


Response by poster: Ah, found it! In Win 7 the Net Share command has a GRANT parameter that sets share permissions.

Thanks!
posted by jluce50 at 8:28 AM on April 9, 2010


Another option would be to have the truecrypt drive mount to a folder of a drive that is already shared, instead of its own drive letter. I haven't done this in Windows 7, but it's simple enough under XP using diskmgmt.msc.
posted by Turbo-B at 10:57 AM on April 9, 2010


« Older Scratch pad for Chrome?   |   Is my laptop insurable for travel? Newer »
This thread is closed to new comments.