MSFN Forum: CMD program run background - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

CMD program run background Rate Topic: -----

#1 User is offline   narayanaswamy 

  • Newbie
  • Group: Members
  • Posts: 25
  • Joined: 02-September 08

Posted 26 May 2009 - 05:20 AM

Hi ,
Can anyone tell me how to run a program in background in command prompt.For eg:if i have to run an example.exe in command prompt without the command prompt being show,what i have to do?Thanks in advance..


#2 User is offline   gunsmokingman 

  • MSFN Master
  • Group: Super Moderator
  • Posts: 2,019
  • Joined: 02-August 03
  • OS:none specified
  • Country: Country Flag

Posted 26 May 2009 - 08:19 AM

VBS script is what you want.
Example 1 no spaces in path

Quote

Dim Act :Set Act = CreateObject("Wscript.Shell")
Act.Run("C\FolderOne\YourExe"),0,True


Example 2 spaces in path

Quote

Dim Act :Set Act = CreateObject("Wscript.Shell")
Act.Run(Chr(34) & "C\Folder One\Your Exe" & Chr(34)),0,True


#3 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,195
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 26 May 2009 - 03:25 PM

I'm afraid you'd need to give us a lot more than you have if you wish a different solution to that you've thus far received.

#4 User is offline   narayanaswamy 

  • Newbie
  • Group: Members
  • Posts: 25
  • Joined: 02-September 08

Posted 31 May 2009 - 07:18 AM

Thanks for the reply.
I may explain my need.I want an app to run in startup.But i wish it to run after 4 minutes of startup.So i thought of writing a batch file which has a pause of 4 minutes and then calls the app.then i will put this in the startup.But if i do this as explained,a command window will pop up at startup and will wait till the execution completes.But i want to do this silently without the user being known of it.Is there any way to do this.I dont want to do this using scheduled task.Also i will like to know how this is done in windows as it is done in linux.
Thanks in advance..

#5 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,195
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 31 May 2009 - 01:32 PM

What app, (or at least what type), is it?

If the app' has a commandline interface as opposed to GUI its execution may need to be implemented differently.

#6 User is offline   d347hm4n 

  • Group: Members
  • Posts: 4
  • Joined: 12-June 09

Posted 12 June 2009 - 05:02 PM

Look at the command switches for cmd.

cmd /?



cmd -q "example.exe"


I think, but the documentation is pretty good.

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy