Results 1 to 6 of 6

Thread: Weird question but I gotta ask anyway

  1. #1

    Thread Starter
    Member
    Join Date
    May 2000
    Posts
    37

    Wink

    Hi folks,

    I got this weird question and want to ask what you think of it. When you install a software, it has all these screen forms where you just click on Next to go on to the next screen and proceed installing. Is it possible in VB to program a code or record a macro such that it will just say yes to all the questions, like accepting all defaults so that the user doesn't click the NEXT button or YES button, it just proceeds to the installation process right away?

    Does that mean you should have access to the source code of the installation process? What happens if the software is using Install Shield? Would this be possible at all or not?
    Thanks!
    Thanks for reading my post!

  2. #2
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Boulder, Colorado, USA
    Posts
    325
    Shore is.

    1 way you can do it is through SendKeys, look at the code example in the VB help.
    -Shickadance

  3. #3

    Thread Starter
    Member
    Join Date
    May 2000
    Posts
    37

    Unhappy

    Hi Mr. Shickadance,

    Thanks for the idea. Now I get what you mean. I looked at the example in MSDN, and this is the code for their sample.

    Code:
    Dim ReturnValue, I
    ReturnValue = Shell("CALC.EXE", 1)   ' Run Calculator.
    AppActivate ReturnValue    ' Activate the Calculator.
    For I = 1 To 100   ' Set up counting loop.
       SendKeys I & "{+}", True   ' Send keystrokes to Calculator
    Next I   ' to add each value of I.
    SendKeys "=", True   ' Get grand total.
    SendKeys "%{F4}", True   ' Send ALT+F4 to close Calculator.
    This runs the calculator.exe and adds 1+1+2+2....n+n... This is a cool example and it helps to understand what Sendkey function is really doing. But how do you manipulate the NEXT button in your setup.exe of the application? It's not as easy as numbers in the calculator. Help!
    Thanks for reading my post!

  4. #4
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Boulder, Colorado, USA
    Posts
    325
    You should be able to send Tabs and Return. So, you have to know how many tabs you need per form.
    -Shickadance

  5. #5
    Lively Member
    Join Date
    Mar 2000
    Posts
    87
    Some install programs have command line parameters that can be used so that you can do exactly that, an unattended installation. Not sure where you could find out if your install program has it or not

  6. #6
    Fanatic Member
    Join Date
    Jan 1999
    Location
    UK
    Posts
    554
    and some buttons have captions pre-fixed with the '&' sybmol (the accelerator) and that means you use ALT + the following key.

    Like ALT +F for the file menu
    so you could still sendkeys


    DocZaf
    {;->

Posting Permissions

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



Click Here to Expand Forum to Full Width