Results 1 to 4 of 4

Thread: C or C++ open exe from cgi-bin

  1. #1

    Thread Starter
    Hyperactive Member pgrimes's Avatar
    Join Date
    Aug 2001
    Location
    sacramento
    Posts
    342

    C or C++ open exe from cgi-bin

    Can a cgi prog written w/ C or C++ open a vb exe file? I've been trying to do this from asp and w/ a vb activex dll (called from asp). I've tried many things, and pretty much get the same result. The exe that I want to open, doesn't execute how it is supposed to. When it's called, a process will be shown in the processes window of the task manager, (win2k) but the prog never does anything. Can a cgi prog in c/c++ call my exe file and have it run normally (as if I double clicked it??) Thanks for your help.

    Paul

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    The program's running fine.

    You're just not collecting the output from it properly. I assume you want to get the output of a console program? If you've put it into your cgi-bin folder, then use:

    http://servername/cgi-bin/program.exe?arg=5&other=that+is+mine
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Hang on, I got that the wrong way round (just in case my last reply did actually post, since the server's going weird today).

    The VB program can't do anything, since they don't normally produce console output.

    What exactly are you trying to run?
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  4. #4

    Thread Starter
    Hyperactive Member pgrimes's Avatar
    Join Date
    Aug 2001
    Location
    sacramento
    Posts
    342
    I made a vb program that opens up a txt file (.cpd... made by some data collection sftware my company uses). The file is opened in excel, space and tab delimited and stuff. My prog takes uses excel to make some charts out of the cpd data (in excel). Then, my prog has excel save the file (when file is saved, gif images of the charts are created). Next, my prog writes some html code and includes the images that excel made as well as some other data from the excel file.

    All that stuff works great, I'm happy with the prog. People will be able to download it. Another option I want them to have is to be able to click on a spot on a web page (associated w/ one of those .cpd files), and have the path to the cpd file passed to my prog. (a different version of course, requiring no user input) then have my prog create the html file and serve that up to the user. I've thought of a bunch of ways to try this... none work so far. So, I modified my prog to do everything it needs to do. All it needs is a path to the file it needs to work on. I want to have asp or something write the pathname to a file (this isn't a problem), then have my program open up (this is the problem) and read the line from the text file (also, not a problem).

    So, that's what I'm looking to do... and am very stuck on.

    Thanks for reply... Paul

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