VFP Run Command

Posted on 2009-12-25
Last Modified: 2012-05-08
How to launch a VFP RUN command without DOS window showing up?

I am trying to change the settings in the BullZip PDF printer driver. I can do it with:

           RUN /N7 BZCONFIG.EXE /S OUTPUT "FileName"

but the DOS window flashes annoyingly. Any to to hide the DOS window.

Question by:MichaelKatz
    LVL 11

    Accepted Solution

    MichaelKatz, are you looking for somethink like this?

    Author Comment

    Possibly. I was hoping for something simpler like a setting or parameter.

    I'll try this and get back.


    Happy Holidays.
    LVL 27

    Assisted Solution

    = ExecuteShell("BZCONFIG.EXE", "", "", ' /S OUTPUT "FileName"')

    FUNCTION ExecuteShell
    LPARAMETERS cFile, cOperation, cDefaultDirectory, cParameters
    LOCAL nHwnd, cParameters, cDefaultDirectory, nShowWindow
    DECLARE INTEGER ShellExecute IN shell32.dll AS ShellExecute;
          INTEGER nHwnd,;
          STRING @cOperation,;
          STRING @cFile,;
          STRING @cParameters,;
          STRING @cDefaultDirectory,;
          INTEGER nShowWindow
    nHwnd = 0
    cOperation = IIF(EMPTY(cOperation),'open',cOperation)
    cParameters = IIF(EMPTY(cParameters),NULL,cParameters)
    cDefaultDirectory = IIF(EMPTY(cDefaultDirectory),'',cDefaultDirectory)
    nShowWindow = 1
    = ShellExecute(nHwnd, @cOperation, @cFile, @cParameters, @cDefaultDirectory, nShowWindow)

    Author Comment

    Nordtorp & captaincyril

    Both methods work to hide the command window but for some reason the changes do not take effect. I believe it is because a new instance of comspec is initiated and is not visible to the printer driver.

    I solved the problem by changing the calling window method AlwaysOnTop to True and then back to False.

    Thanks anyway

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: (http://msd…
    Great sound, comfort and fit, excellent build quality, versatility, compatibility. These are just some of the many reasons for choosing a headset from Sennheiser.
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    794 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

    14 Experts available now in Live!

    Get 1:1 Help Now