Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have an external hard drive containing all my documents, and it is encrypted with a password via Truecrypt. I'd like my desktop computer at home to automatically mount the volume prior to my logging in (so that it can be used as my user folder) without asking me for a password. (Yes, the password can be saved in plain text on my desktop's hard drive - that's okay.) For the life of me, I can't figure out a way to do this that actually works though.

Tried using the Task Scheduler to schedule a mount when the computer starts up, and it works, but the volume is only accessible by my user account after I log in. (Haven't tried every combination of users/options for the scheduled task, so maybe there's something else there I need to try.) Also tried adding a startup script for my user account that runs on login, which evidently is too late to set up the user's profile folder. Anybody ever successfully achieve this or something like it?

share|improve this question
    
I have never heard of running a program before a user logs into an account on Windows. How can you access a drive on Windows if you are not logged into the account? –  Ramhound Jun 13 '12 at 11:20
    
Why do you need your user folder to be located in an external drive?. If you're talking about the default folder where documents are saved, it would be easier to set your library to include the external hard drive. If you're talking about the actual user folder, well, it's where Windows saves your personal program settings and data, so you can't login without it. –  Martheen Cahya Paulo Jun 13 '12 at 21:24
    
I'm aware that I won't be able to log in without the drive. (Actually, I can -- Windows will just create a temporary user folder since the normal one is inaccessible.) That's the way I want it. This was fairly easy to do on Windows XP using a login script and my choice of registry tweaks or a junction, but evidently Windows 7 wants access to the folder before the login script runs. Having the user folder on the drive would just simplify things since not everything on the drive is organized into a "library". (Plus things like the desktop are not actual libraries to my knowledge.) –  nonoitall Jun 14 '12 at 5:09
add comment

2 Answers

up vote 2 down vote accepted

I was finally able to kind of get this working in the Task Scheduler by having the user called "SYSTEM" be the one to execute the task (on startup). If I attempt to log in to my user account too quickly, it doesn't work, but if I wait a few seconds it mounts and I can successfully log in. Wish there was a synchronous way to run a task prior to login...

share|improve this answer
add comment

You could try running the commandline that mounts the drive as a service. It will end after a few seconds, but that probably doesn't matter.

To run any .exe as a service using srvany.exe from the resource kit:

http://support.microsoft.com/kb/137890/en

Under the parameters key as described in the tutorial, you can also add the REG_SZ value called AppParameters for any additional command line parameters.

Example:

Key: ...\services\servicename\Parameters 
Application = "C:\truecrypt.exe"
AppParameters = "mount c:\sometrufile somepassword"

I don't know the exact parameters for TrueCrypt, but that should give you a good idea of what to do.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.