Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Run .bat file???
Message
From
18/06/2010 13:48:36
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Oracle
Miscellaneous
Thread ID:
01469536
Message ID:
01469643
Views:
48
>...so I'm using the RUN /N7 command to try to do this. I *thought* the N7 switch would keep the dos window from appearing but it still flashes. Anyway surely there is a better approach to do this than what I've come up with thus far.... any suggestions anyone?

I'm using Ed Rauh's appRun API (downloaded from UT). Very simple to use and wraps all the API calls. There's the hidden option in there, that actually works.

I mostly use it for zipping, and there's a neat old trick that I had to remember (ie. google it out, with lots of effort), to capture the stderr output. Note the 2> part in the end of the command line:
*-- TEXT BLOCK BEGIN
TEXT textmerge noshow to lcBat
"<<lcPkZip>>" -add=update "<<lcZipName>>"  "<<tcBkp>>" >zip.log 2>"err.log"
ENDTEXT
*-- TEXT BLOCK END
			lcBatFile=Fullpath(Forceext(Sys(2015),"bat"))
			lcThere=Fullpath(".")
			Strtofile(lcBat, lcBatFile)
			Local oprocess As api_apprun Of Process.vcx
			oprocess=Newobject('api_apprun','process', '', lcBatFile, lcThere, 'HID')
			oprocess.LaunchAppAndWait()
			Release oprocess

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform