Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I pass info to an exe through Config.fpw
Message
De
09/08/1998 22:13:24
 
 
À
09/08/1998 11:37:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00124959
Message ID:
00125140
Vues:
14
Assuming you want to use a config file - say called 'myprog.fpw' or something equally imaginative, here's how I would do it:

In the shortcut, put the command line as: drive:\path\myprog.exe Test -cdrive:\path\myprog.fpw

The startup directory is drive:\path

In your main prg (assuming you use a prg to start the ball rolling in your app), start off with the line PARAMETERS cParmname (pick your own var).

If your "main" is not a prg, then you'll have to put it probably into the init of whatever your 'main' is. I find life much simpler if I use a main.prg type of startup.

Alan

>Alan -
>
>My paths are set up inside the exe and I did try passing the parameters through the shortcut's command line, but that didn't work. The exe seemed to ignore the parameter passing and just went right to the program I specified as the startup. I tried a variety of syntax's thinking I had it wrong, to no avail, e.g.:
>COMMAND= DO mystartprog with "Test". Can you tell me the correct syntax to accomplish this?
>
>Sylvia
>>
>If the paths are set up inside the exe, just pass the parameters to the exe directly from the shortcut's command line. As long as you're using separate shortcuts, it shouldn't be a problem.
>>
>>Otherwise, you need two separate fpw files with the paths pointing to different data directories.
>>
>>>Does anyone know is there's a way to pass parameters to the startup program in an .exe through the Config file or another file? I'm trying to figure out a way to allow users to have two icons on their desktop, one of which would run the application with test data and the other would run the application with live data. I was hoping to do this by specifying a different config.fpw file in the Windows icon for one of them, but couldn't get it to work. I tried using _startup and command = do start.prg with but it seems that the .exe just ignores those lines in the config.fpw
>>>
>>>I finally ended up just copying the app to two directories for now in the hopes I can come up with a better solution. Is there one?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform