Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I pass info to an exe through Config.fpw
Message
De
08/08/1998 18:05:35
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
07/08/1998 17:31:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00124959
Message ID:
00125066
Vues:
14
>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?
>
>Thanks for any advice -
>
>Sylvia

Well, there's always a line fot tunning an additional command before your .exe in the shortcut properties dialog. You could use that to SET an environment variable or run a .bat file where you may set them. Though, I'm not sure of the scope of these environment variables.

Why can't you just call your exe with parameters? The main.prg (or whatever is your main) will receive them as strings. Your shortcut command line may read
c:\whatever\MyVfp.exe "c:\whatever\devdir"
in one case, and
c:\whatever\MyVfp.exe "c:\whatever\production dir"
in another case. Your main.prg should have a
Lparameters lcCurrentDataDir
line at the beginning, to accept the parameters passed.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform