Link to home
Start Free TrialLog in
Avatar of donpick
donpick

asked on

Trying to run a program interactively from a batch file

Running Windows 7 pro on a HP z230 computer

I am trying to get a program to run in batch mode.
The batch file is very simple.
I have attached it as AmibrokerData bat.txt

The batch file runs a vbs file.  I have attached the vbs file as Amibroker_100vbs.txtAmibroker_100vbs.txtAmibrokerData-bat.txt.  This vbs file runs a program called Amibroker.

When I launch the batch file interactively, it runs successfully.
When I schedule the batch file to run, nothing happens.

Amibroker cannot run in the background; it has  to open and display on the screen.
I think the problem is Amibroker cannot run interactively when the batch file is scheduled.

Amibroker requires administrator privileges in order to execute.

What commands could I put into a batch file to allow the vbs script in the batch file to run interactively from a scheduled batch file?
Avatar of Andrew Leniart
Andrew Leniart
Flag of Australia image

In scheduled tasks on the General Tab, under "Security Options" try scheduling the task with a user account that has Administrative privileges rather than using the INTERACTIVE user/group. Also select "Run with highest privileges"  Does that help?
ASKER CERTIFIED SOLUTION
Avatar of John Tsioumpris
John Tsioumpris
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of donpick
donpick

ASKER

Mr Leniart:
  Thank you for your suggestion.  I tried this and it did not work.

Mr. Tsioumpris:  
  Thank you for the link.  I never have heard of this idea.

Mr. Vemaak:  
  You say to change the timeout.  Change it to what???   Please provide details.  I know nothing about the Non Sucking Service manager.
Avatar of donpick

ASKER

Mr. Tsioumpris:
  My vbs requires a parameter file  (you can see this parameter file in my bat file.)

  If I use your idea,  how do I feed the parameter file to the exe file once it is created?
You say to change the timeout.  Change it to what???
Anything you want. 900 in example is 15min
Avatar of donpick

ASKER

Thank you all for your answers.  I appreciate your prompt replies.  I will work with this information.  If I need further help I will post more questions.
In order to pass arguments to VBScript you need
WScript.Arguments

Open in new window