The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.

run program at startup AND auto-enter credentials

chamberlainchamberlain Registered User regular
Let me see if I can explain this.

I am looking for something, be it a batch file or bit of script, that will open a program at startup and enter in a username and password automatically. Just putting a shortcut in the startup folder will not work because the program prompts for authentication. Runas at the command line will not work because the program does not require any special rights to run.

I saw this done at a client and love it, but the jerks wont tell me how they did it. It looked like something ran at startup to do this, because it failed when I installed my program to the wrong directory.

chamberlain on

Posts

  • DietarySupplementDietarySupplement Still not approved by the FDA Dublin, OHRegistered User regular
    edited September 2009
    What kind of program are we talking about here? Is it a stand-alone app, or is it a web page... or what?

    DietarySupplement on
  • ArrathArrath Registered User regular
    edited September 2009
    AutoIt?

    I've made AutoIt scripts to do the very same thing.

    Arrath on
  • PeregrineFalconPeregrineFalcon Registered User regular
    edited September 2009
    I'd go with AutoIt as well, but yeah, is this a command-line authentication with "type login, press enter, type password, press enter" - and how secure does this password need to be kept?

    PeregrineFalcon on
    Looking for a DX:HR OnLive code for my kid brother.
    Can trade TF2 items or whatever else you're interested in. PM me.
  • TheSonicRetardTheSonicRetard Registered User regular
    edited September 2009
    I'd go with AutoIt as well, but yeah, is this a command-line authentication with "type login, press enter, type password, press enter" - and how secure does this password need to be kept?


    If it's command line driven, couldn't he just echo the login and password?

    TheSonicRetard on
  • PeregrineFalconPeregrineFalcon Registered User regular
    edited September 2009
    I'd go with AutoIt as well, but yeah, is this a command-line authentication with "type login, press enter, type password, press enter" - and how secure does this password need to be kept?


    If it's command line driven, couldn't he just echo the login and password?

    Or pipe input from a text file, if it just needs to get the authentication on startup.

    I'd go with AutoIt though, because then it's at least encapsulated in its own little file that can run minimized in the taskbar and not have any output that can be redirected. But we still don't know enough about the app itself to answer 100% Fo' Sho'.

    PeregrineFalcon on
    Looking for a DX:HR OnLive code for my kid brother.
    Can trade TF2 items or whatever else you're interested in. PM me.
  • chamberlainchamberlain Registered User regular
    edited September 2009
    Thanks for the help, I actually ended up cobbeling together a VBS to do it.

    The password did not need to remain secure at all, the program just had to run.

    For the curious:
    Sub Run(ByVal sFile)
    Dim shell

    Set shell = CreateObject("WScript.Shell")
    shell.Run Chr(34) & sFile & Chr(34), 1, false
    Set shell = Nothing
    End Sub

    Run "C:\Program Files\Stromberg40\BIN\TimeManager40.exe"

    Wscript.Sleep 20*1000

    CreateObject("WScript.Shell").AppActivate "System Log-In"
    CreateObject("WScript.Shell").SendKeys "event{TAB}"
    CreateObject("WScript.Shell").SendKeys "event{ENTER}"

    I am sure it could be written better, but I found bits of code it two different places that I pieced together.

    chamberlain on
  • QuantuxQuantux Registered User regular
    edited September 2009
    Scheduled task. Can be specified to run on system startup or when the user logs in, and alternate credentials can be specified.

    Quantux on
    PSN/Steam - Quantux

  • chamberlainchamberlain Registered User regular
    edited September 2009
    Quantux wrote: »
    Scheduled task. Can be specified to run on system startup or when the user logs in, and alternate credentials can be specified.

    A scheduled task wont enter a user name and password into a program, though.

    chamberlain on
Sign In or Register to comment.