Need to Open App1 By Opening App2 Only

Posted on 2005-04-20
Last Modified: 2010-05-02
I made a updater that looks to server to see if any files are needed and updates them then once done it loads app2. Is their a way when user runs app2 it will not load or redirect them to app1. I was using ini & registry but we would get power/ user failure and I would have to go and change it as it was to much of hassle.
Question by:thaburner
    LVL 85

    Accepted Solution

    One possibility is to pass a password from the updater to the main app via command line parameters.  In the main app, if the password is not present in the command line parameters then you know it was executed directly by the user.

    Something like...

    Private Sub Form_Load()
        Dim cmd As String
        cmd = Trim(Command())
        If cmd <> "password" Then
            MsgBox "Please run the updater"
            Unload Me
        End If
    End Sub

    Author Comment

    Thats a good idea I just tried it and it works like I need it. Thanks Idle

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    Introduction While answering a recent question ( in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
    Article by: Martin
    Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now