INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Run Windows App From Clipper

Run Windows App From Clipper

(OP)
I am trying to run a windows app called txttopdf.exe from a a Clipper application. My clipper program reads the line of code:
Run ("C:\Utility\txttopdf.exe")
but nothing happens.
So I tried just to open a dos window by writing a program with only one line:
Run "C:\Winnt\System32\cmd.exe"
and no dos window opened.
Any ideas how to call a app from a clipper program?

RE: Run Windows App From Clipper

I assume you checked the paths, ofcourse, but this indeed is a way to run external tools, including Windows apps. Must be some permissions stuff, can't see from here, sorry.

HTH
TonHu

RE: Run Windows App From Clipper

Hi, dlpastel

I think what you want to do in this case is use the START command rather than invoking the windows program directly.

Most likely the windows app is failing to start for some reason and immediately terminating, so you don't see anything happen. By using start, possibly with the /separate option you will be running the app in its own window and address space which will enable it to start up or if not at least you may see the crash.

BTW, I am assuming it does work when you type C:\Utility\txttopdf.exe at the command prompt in the same folder in which you are executing the clipper program.

Use START /? at the CMD prompt for syntax and list of options.

The reason shelling to cmd didn't work ...

1. you didn't give cmd anything to do, and no /k to stay resindent so it terminates when finished. Very short run.
Try:

xCmd := 'start "New Window" cmd /k "echo Hello World"'
run &xCmd

2. Or ... maybe it did - the dos prompt would look the same, are you sure you weren't at the second command prompt? It would not have redisplayed the copyright or cleared the screen etc.

Jock

RE: Run Windows App From Clipper

I use the Blinker SWPRUNCMD.

Under Windows XP:
swpruncmd("cmd /c start ssrpt32 " + ::INIFile, 0, "", "")

Under all other windows since 95:
swpruncmd( "SSRPT32 " + ::INIFile, 0, "", "")

The difference is that XP will lock the DOS app until the windows app completes unless you use the special method.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close