Solved

Running exe files in background

Posted on 2011-02-14
3
673 Views
Last Modified: 2012-06-21
Hi,

I want to run exe from bat file but the exe should run in background.. My bat file looks like
cd /d C:\Folder
C:\Folder\nxslt.exe  -t
C:\folder\input.xml
C:\folder\some.xsl -o
 C:\folder\output.xml >> ErrorLogs.log 2>&1

I tried using a vbs file also but it didn't worked.
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "C:\Folder\Example.bat" & Chr(34), 0
Set WshShell = Nothing
0
Comment
Question by:priyanka_kothari
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 6

Expert Comment

by:mslunecka
ID: 34889933
Try changing the code in your VB script where you run the batch file to this:

Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run("%comspec% /K C:\folder\example.bat"), 0, True
0
 
LVL 56

Accepted Solution

by:
Bill Prew earned 500 total points
ID: 34893339
In BAT you can use the START command to start the EXE and keep running like:

start "" "C:\Folder\nxslt.exe"  -t

you can do START /? at a command line to see additional options, like starting minimized, etc.

~bp
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ok I have been working on this for some time having learned and gained certification in XenDesktop 4 along came version 5 which was released last month. Since then I have been working to deploy XenDesktop 5 in a small environment with only 2 virt…
Sometimes people don't understand why download speed shows differently for Windows than Linux.Specially, this article covers and shows the solution for throughput difference for Windows than a Linux machine. For this, I arranged a test scenario.I…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question