How to start a .bat-File automatically with user-login as administrator RRS feed

  • Question

  • Hello together, 

    first, my English is pretty bad, so sorry for this. 

    Let me first describe my problem: 

    On a Windows 7 PC in a Domain, there's a service, wich loggs the User into a programm with his domain-credentials. 
    The services starts on start up of the pc, but can't finish, because the user still hasn't logged in. 

    So I decided to write a Batch-file with the content: 

       "  SC Start "PDMWorks Workgroup Server"  "

    (SC Start (Start a Service, PDMWorks... ist the name of the service)

    I started the Windows Task-scheduler (not sure what's the English word is), 

    created a new task which executes the batch-file by user-login. 

    The Problem is, the command "SC Start ..." requires administrator rights. So this doens't work for me. 

    (I also tried to do a linkage of the .bat file, gave that Administrator rights, but when i try to start the linkage, the Task-scheduler only takes the real .bat-file. )

    The domain-user is a local administrator on his pc. 

    How can this problem be solved? 

    Maybe somebody can compile this command into an .exe. 
    With a .exe I could give the programm at "Compability" the prompt "Run as Administrator"

    Or maybe somebody can give me a reason for my problem... 

    It's not possible to switch off the UAC... 

    I really hope, somebody can help me or answer my questions!



    Tuesday, May 6, 2014 7:46 AM