This is a re-post of a message I posted on the NUG several months ago, but
didn't get a response with a solution.
I have a bat file that I need to run programmatically from 4D v15 on a
Windows 7 computer.
The bat file runs fine when I manually double-click on it. When run via the
4D code below, the console window appears for a second, then closes. On one
computer the bat file executes with the expected results, on another, it
doesn't.
SET ENVIRONMENT VARIABLE("_4D_OPTION_BLOCKING_EXTERNAL_PROCESS";"false")
SET ENVIRONMENT VARIABLE("_4D_OPTION_CURRENT_DIRECTORY";"mybatfilefolder")
SET ENVIRONMENT VARIABLE("_4D_OPTION_HIDE_CONSOLE";SW_SHOW)
LAUNCH EXTERNAL PROCESS("c:\\Windows\\System32\\cmd.exe /C mybatfile.bat"
The cmd.exe application file is set to always run as administrator.
Any idea why this is working on one computer but not another?
TIA,
David Rose
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************