Batch file to login to windows user

Discussion in 'Programming' started by venkikmit, Sep 14, 2009.

  1. #1
    hi
    Can any one please tell me how to do the batch file(.bat) for

    1. login to the windows user with the username and password after startup

    2. i need to mention the time interval to login after the startup.

    3.then lock the system.

    it would b great if you guys can help me.

    thanks in advance:)
     
    venkikmit, Sep 14, 2009 IP
  2. Digital Linx

    Digital Linx Peon

    Messages:
    74
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This is impossible with batch, however it is possible using WinAPI or MFC
     
    Digital Linx, Sep 15, 2009 IP
  3. pneulameiro

    pneulameiro Peon

    Messages:
    440
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If you are talking about windows xp sp2 there exists a way to login as admin even without the password by opening a cmd.exe windows before login. Maybe you can find some article on the web explaining this issue. This could help you. But I think that this security failure is not present in sp3.
     
    pneulameiro, Sep 15, 2009 IP
  4. Digital Linx

    Digital Linx Peon

    Messages:
    74
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You're probably talking about replacing the screen saver file which is shown upon authentication once the machine goes idle with cmd.exe. That would require to replace the file from a 3rd party OS i.e. livecd of some sort or to mount the harddrive on a different machine.
     
    Digital Linx, Sep 15, 2009 IP
  5. pneulameiro

    pneulameiro Peon

    Messages:
    440
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    it is really something like that. I think that there is no other way to do this or windows xp is much more unsafe than we think :)
     
    pneulameiro, Sep 16, 2009 IP
  6. venkikmit

    venkikmit Active Member

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #6
    Thanks for the replies:)

    i could not succeed with batch file i found that there s a tool Tweak UI and its finally logging in,but i need to edit the autoexec.bat file ,then only i can set the delay to login.

    When i open the autoexec.bat from C:\ ,its empty .anyone know how to edit that file?
     
    venkikmit, Sep 17, 2009 IP
  7. pneulameiro

    pneulameiro Peon

    Messages:
    440
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I think autoexec.bat does not work for windows xp programs. If you need to initialize a program in windows startup then you need to go to "msconfig".
     
    pneulameiro, Sep 17, 2009 IP
  8. venkikmit

    venkikmit Active Member

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #8
    Please tell me where to edit in msconfig
     
    venkikmit, Oct 5, 2009 IP