Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Running exe files in background

Posted on 2011-02-14
3
Medium Priority
?
674 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 57

Accepted Solution

by:
Bill Prew earned 2000 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Step by step guide to Clean and Sort your windows registry! Introduction: Always remember: A Clean registry = Better performance = Save your invaluable time In this article we're going to clear our registry manually! Yes, manually! The e…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
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…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

670 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