Results 1 to 13 of 13
  1. #1
    Lounger
    Join Date
    Apr 2011
    Posts
    44
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Any way to have system run a batch file at logon without admin password?

    I have a Truecrypt file container. For some reason, TC will not automatically "mount selected volume on start up," a "feature" of TC that doesn't seem to work for me.

    I created a batch file to do what TC is supposed to do:
    d:\TrueCrypt\TrueCrypt.exe /a favorites /quit

    This is in my Startup group. However, when I log on as a standard user, it always demands an admin password before running TrueCrypt.

    My question is if there is any way to get TrueCrypt.exe to start up on logon without having to enter and admin password?

    Windows 7 Ultimate, sp1

  2. #2
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    20,538
    Thanks
    1
    Thanked 614 Times in 550 Posts
    Use task scheduler to setup a task that runs at user logon to execute the batch file. You can set the credentials in the task definition.

    Joe

  3. #3
    Lounger
    Join Date
    Apr 2011
    Posts
    44
    Thanks
    0
    Thanked 3 Times in 3 Posts
    After looking at your suggestion, I tried this several ways. I tried setting it up in my RandySea Standard account as a task with Run with Highest Privileges checked. This didn't work. Same unchecked. Each time I got a dialog box asking for an admin password for my admin account.

    Then I set it in Task Scheduler to use an admin account when running. This did not work, either. If I switched to the admin account, that task ran there. When I switched back to the standard user, it acted as if it had run there, too. This was mounting a TrueCrypt volume.

    I then logged on to that admin account. From the admin account, I accessed the task I had set up with my standard account. I checked run with highest privileges. It prompted for an admin password, which I entered.

    When I rebooted, nothing happened in the standard acct. I still get the prompt there for an admin password.

    What am I missing?

  4. #4
    5 Star Lounger
    Join Date
    Jan 2010
    Location
    Los Angeles, CA
    Posts
    793
    Thanks
    3
    Thanked 27 Times in 25 Posts
    Try adding the /p option to your batch file. See this for more details:
    http://www.truecrypt.org/docs/?s=command-line-usage

  5. #5
    Lounger
    Join Date
    Apr 2011
    Posts
    44
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Thanks, cafed00d. The /p option is for eliminating the TC password for mounting the volume, which I definitely don't want to do. The password I'm trying to eliminate is the one Windows asks for before it will even run truecrypt.exe when I'm logged on as a standard user.

    Anyone who only has the original account Windows 7 required them to make when installing will never see the problem I do. That's because the original account has admin privileges. As an added security layer, I prefer to logon on with a different, standard user account.

  6. #6
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    20,538
    Thanks
    1
    Thanked 614 Times in 550 Posts
    When you select "run with highest privileges" that invokes UAC at run time. You'll always be prompted for admin credentials when that is selected. I think you need to provide admin credentials in the security options section and select "run whether the user is logged on or not".

    I just stumbled across this - Make Vista launch UAC restricted programs at startup. The procedure should be the same or very similar for Windows 7.

    Joe
    Last edited by JoeP517; 2011-05-12 at 10:29.

  7. #7
    Lounger
    Join Date
    Apr 2011
    Posts
    44
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Thanks, JoeP. Your link gave me hope. Unfortunately, carefully following the instructions, it did not work for me in Windows 7 Ultimate.

  8. #8
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    20,538
    Thanks
    1
    Thanked 614 Times in 550 Posts
    What happened?

    Have you checked the event logs for any additional information?

    Joe

  9. #9
    Lounger
    Join Date
    Apr 2011
    Posts
    44
    Thanks
    0
    Thanked 3 Times in 3 Posts
    I have checked the task scheduler history log and applications events logs. The problem is there is nothing discernable as an error or warning. The system functions just as it always had. When Task Scheduler, or a batch file in Startup, says to run the program (TrueCrypt.exe), the UAC asks for an admin password for a listed admin acct. If I type it, TC runs. If I don't enter it, TC just doesn't start up.

    There's no entry like: "Allowing this admin program to run for a standard user because an admin user scheduled it."

  10. #10
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    20,538
    Thanks
    1
    Thanked 614 Times in 550 Posts
    Sorry, I'm out of ideas. Hopefully someone else will jump in.

    Joe

  11. #11
    Lounger
    Join Date
    Apr 2011
    Posts
    44
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Appreciate your trying, Joe. I guess this is how msft wants it to work, for better or worse. It just means I have to enter three passwords to log on instead of two. Or always log on with admin rights, but not doing that seemed like an advantage of moving to Windows 7.

    Randy

  12. #12
    Super Moderator bbearren's Avatar
    Join Date
    Dec 2009
    Location
    Polk County, Florida
    Posts
    2,378
    Thanks
    14
    Thanked 238 Times in 190 Posts
    Have you tried changing the ownership of "TrueCrypt.exe" to "System"?
    Create a new drive image before making system changes, in case you need to start over!

    "Let them that don't want it have memories of not gettin' any." "Gratitude is riches and complaint is poverty and the worst I ever had was wonderful." Brother Dave Gardner "Experience is what you get when you're looking for something else." Sir Thomas Robert Deware. "The problem is not the problem. The problem is your attitude about the problem. Do you understand?" Captain Jack Sparrow.
    Unleash Windows

  13. #13
    Lounger
    Join Date
    Apr 2011
    Posts
    44
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Quote Originally Posted by bbearren View Post
    Have you tried changing the ownership of "TrueCrypt.exe" to "System"?
    Good idea. I made a copy of TrueCrypt.exe and changed to owner to System. I created a new task while logged on as an admin. The new task runs TrueCryptSystem.exe at any logon, with highest privileges checked.

    I rebooted and logged on to my standard user account. I had to run TaskScheduler as an admin to see the history. The main screen said "the task is currently running." The history log said Task Started, Action Started, and Create Task Process, along with times, numbers, etc. However, if I run Task Manager, there is no sign of the program. Indeed, if it had started up, it would have given me a prompt to mount a volume.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •