Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Alt key not working after calling API_APIRUN
Message
From
26/10/2005 06:48:14
 
 
To
25/10/2005 20:35:19
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
01060394
Message ID:
01062159
Views:
19
>>Sergey,
>>
>>I cannot use unmodified API_APPRUN since I need to pass password using env variable.
>>However I tried the same code to run netstat.exe .
>>In this case Alt+F key works OK.
>>
>>I call pg_dump.exe to create backup copies from my VFP 7 or 9 application.
>>
>>The command which I use to backup database is
>>
>>C:\Program Files\PostgreSQL\8.0\bin\pg_dump.exe -Z9 -b -v -f "c:\my document\myfile.backup" -F c -h myserver -U postgres mydb
>>
>>I pass password to pg_dump using environment variable PGPASSWORD
>>
>>Maybe I need to make some keyboard initialization after pg_dump finishes
>>but I have no idea.
>>I pass only some Windows environment variables to pg_dump, maybe some critical environment variable is missing.
>
>Why not generate a batch file, like this:
>
>
set pgpassword=whatever
>C:\Program Files\PostgreSQL\8.0\bin\pg_dump.exe  -Z9 -b -v -f "c:\my document\myfile.backup" -F c -h myserver  -U postgres  mydb
>set pgpassword=
>exit
>and use the .bat's name as the command to run? You can delete the .bat after use (so you wouldn't have a text file containing the password hanging around your disk).
>
>I'm using this technique (generate a batch, run it, delete it) regularly and it seems much easier than trying to do everything in one line.

Dragan,

thank you. This is bright idea.

pg_dump is a 32 bit windows console application.
I tried using RUN command to run this bat file but got an error for pg_dump.exe file

Program too big to fit in memory

The console window remains in screen after this and contains readable password in SET= statement.
Andrus
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform