Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

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:

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.


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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .