responding to system prompt

This is a discussion on responding to system prompt within the A Brief History of Cprogramming.com forums, part of the Community Boards category; This a win2k problem, but because its a console app I thought I'd post here as well. I'm having trouble ...

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    8

    responding to system prompt

    This a win2k problem, but because its a console app I thought I'd post here as well.

    I'm having trouble figuring out how to respond to a system prompt in a console application.

    I need to run a setup.exe on users PCs under the admin context.

    If I do something like:
    system("runas /user:computername\administrator setup.exe");

    the system then prompts me with:
    "enter password for administrator"

    I thought I could send the password to the keyboard buffer, but the problem is that the console app stops processing until a response is typed at the command prompt.

    I'm not sure how to get around this. I used to use su, which allows you to supply a password as a parameter but microsoft has taken this functionality away with runas.

    Any help appreciated.
    Thanks,
    CMG

  2. #2
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    maybe there's an interrupt to simulate keystrokes that you could tie into.
    hasafraggin shizigishin oppashigger...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Printing System time and 30 minute alarm
    By kevndale79 in forum C Programming
    Replies: 16
    Last Post: 10-17-2006, 06:10 AM
  2. Linux database system needed
    By BobS0327 in forum Tech Board
    Replies: 7
    Last Post: 06-11-2006, 04:56 PM
  3. measuring system resources used by a function
    By Aran in forum C Programming
    Replies: 1
    Last Post: 03-13-2006, 05:35 PM
  4. New system build wont boot
    By lightatdawn in forum Tech Board
    Replies: 7
    Last Post: 12-02-2005, 06:58 AM
  5. BIOS system and memory allocation problem
    By beely in forum Tech Board
    Replies: 9
    Last Post: 11-25-2003, 07:12 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21