Run anything as service – Start a program before logon
I recently came to problem, where I needed to run a program before I do login. One solution was setting up a startscript using gpedit.msc, but this needed me to disable an option which makes Windows login much faster. So I came to another solution: Run the program as service!
This is surprisingly easy: Microsoft has added a programm, called sc.exe which does this job for you. Here is an example
sc.exe create "TrueCrypt Automount" start= "auto" binPath= "C:\automount.bat" DisplayName= "TrueCrypt Automount"
Categories: Blog

GMod
TS3
SVN
Filedump
running aps one level higher than admin is funy too, all you had to do is to replace the system binary for the Accessibility features with cmd.exe and then run it before logon…
Now I have a strange behaviour: Running the TrueCrypt mounter I wrote too early tends to Windows 7 not seeing the mounted partition – Sometimes. But I need it to work that way: Run Windows, mount before login (since apps are on these partitions) with keyfiles (the system disk is encrypted with TC too but uses a different operationmode – so keyfiles are safe). It’s strange and only seems to be an issue with the explorer: The apps on it work but I can’t access the files on it
It’s the windows explorer.
TrueCrypt has a menu-option, which says “Refresh Drive Letters”. Pressing it makes the mounted HDD visible.
Sadly, I can only trigger this by the menu (I looked at the sourcecode) and not by a commandline.
So I have to figure out how TC “refreshes” it and recode it as a small app.
I also noticed, inserting an USB-HDD “refreshes drive letters” too.
I know this is an old thread, but it took me a lot of googling to find the answer to this one, so for the benefit of anyone else who googles and gets here…
sc.exe can be used to automount truecrypt pre-login, but a startup batch with the following 2 command lines fix the explorer issues:
devcon rescan
(refreshes plug & play devices)
http://support.microsoft.com/kb/311272
nircmd shellrefresh
(refreshes Explorer)
http://www.nirsoft.net/utils/nircmd.html
Good luck!
Hello Anne-Lise
thank you for your reply.
I could have needed that program in the past because I had exactly this problem.
My workaround was writing this program in order to fix the missing drives bug in the Explorer. Up to know I am using my program but in the future, I will switch to another HardDisk encryption Program called DiskEncryptor because it is as fast as TrueCrypt in AES-256, faster in Serpent and TwoFish but also supports SSD optimizations and especially the ATA-TRIM command.
Today I performed some benchmarks with an older HDD (5-6 years old) and DiskCryptor (1.0.667 – beta) was winning every single time against TrueCrypt and just dropped with the performance for data-blocks below 4 KB (about 10% less performance) where TrueCrypt was still significantly slower for blocks at and below 16 KB and there even up to 50% slower.
nkqh xfjxk miasporn igiyqm g rq z xuq