Jump to content

Recommended Posts

Posted (edited)

The setup i have at home is I have one hard drive for the OS, and a separate HD where the whole drive is encrypted with truecrypt.

 

When I login I have to enter the password and the encrypted drive then shows up in "My Computer"

 

The problem is that i have 2 shared folders for my media centre, "Movies" and "Music"

Everytime that the drive is re-added the shares get removed?

 

The "shared" icon on the folder stays but when you look at the properties of the folder it is no longer shared???.

 

Does anyone know why this is???, i dont think its win7 specific.

Is there maybe a script that can setup a shared folder quickly?

 

Thanks in advance

 

http://img339.imageshack.us/img339/9026/45637825.jpg

Edited by burgemaster
Posted

I sorted this with a script if anyone ever has the same problem:

 

The BAT script loads truecrypt, mounts the encrypted drive then calls a VBS Script to share the folders after the encryption password has been entered.

BAT script:

 

@echo off

title Add Hard Drive

echo ENTER PASSWORD into truecrypt.....

@ "C:\Program Files (x86)\TrueCrypt\TrueCrypt.exe" /auto favorites /quit

cls

setup_shares.vbs

 

setup_shares.vbs VBS script:

 

Const FILE_SHARE = 0

Const MAXIMUM_CONNECTIONS = 25

 

strComputer = "."

Set objWMIService = GetObject("winmgmts:" _

& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

 

Set objNewShare = objWMIService.Get("Win32_Share")

 

errReturn = objNewShare.Create _

("g:\Music", "Music", FILE_SHARE, _

MAXIMUM_CONNECTIONS, "Music share for XBMC")

 

errReturn = objNewShare.Create _

("g:\Movies", "ovies", FILE_SHARE, _

MAXIMUM_CONNECTIONS, "Movies share for XBMC")

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...