How to run an interactive batch file on windows from a service?

Let’s learn how to run an interactive batch file on windows from a service. The most accurate or helpful solution is served by Stack Overflow.

There are ten answers to this question.

Best solution

Cannot run a batch file from a Windows service in Windows server 2003 OS

I am using the following code to run a batch file from C#. The following code is part of my windows service. This code works perfectly fine in Windows XP but when I deploy my windows service to Windows server 2003 OS it returns exit code 1 (failure). Does someone know what I am missing? Do I need to give some special permission to the windows service? The service is installed as a Local System service. ProcessStartInfo psi = new ProcessStartInfo(); //specify the name and arguments to pass to the...

Answer:

My next set would be to try setting the service to run as the user you're logged in as when it works...

Read more

Khawar Yunus at Stack Overflow Mark as irrelevant Undo

Other solutions

Windows Batch File - Run Minimized?

I've a batch file for automatically uploading a file from my computer to my webspace. The batch file does it's job perfectly but I'm having problems automating the running of the batch file. I've set up a scheduled task to run the file but the problem...

Answer:

The scheduled task "sees through" the shortcut if you create it using "Browse"....

Read more

daveirl at Ask.Metafilter.Com Mark as irrelevant Undo

How to make a batch file to run a line of code in CMD?

I'm setting up a basic FTP server and there's a line of code I need to run (c:\python27\python -m SimpleHTTPServer 8080) to start the server. I want to make a batch file with @echo off to hide the CMD window. Anyone know how to make a batch file that...

Answer:

This minimizes the CMD window right away and then runs whatever follows the ":minimized" line...

Read more

dylanm31... at Yahoo! Answers Mark as irrelevant Undo

How to grant exclusive access to a web service from just those PCs?

Using PHP/MySQL/javascript: I need a way to grant exclusive access to a web service from just 2 or more PCs sharing the same public IP address, which is dynamically assigned by the ISP; I can setup these PCs as needed, and I must make an outside PC has...

Answer:

Oh, I wasn't aware, but you should also check out the bit on the Allow From page that talks about UserAgent...

Read more

lion at Ask.Metafilter.Com Mark as irrelevant Undo

How to install a software using batch file or windows command line?

I need to know how to install a software using a batch file or windows command line. Or explain how to do these steps. Let's say I have the file software.exe I need to run the software and then click the Next button Tick the Agreement and then click...

Answer:

You cannot do this via batch scripting. You have three choices: 1. use an unattended installation of...

Read more

Sarah at Yahoo! Answers Mark as irrelevant Undo

Creating a windows service for inserting data from text file to MS access database?

I am dealing with windows services in VB.NET for the first time. I need to create a windows service which must run daily at particular time(say 9 A.M). At that time, it must read data from a text file and split it with the help of delimiter and insert...

Answer:

Start with a service project template which is found in the standard and pro versions of VB

Read more

venkata chala at Yahoo! Answers Mark as irrelevant Undo

Command Prompt windows 7 batch file password problem?

Hello I'm creatung a batch file for a windows 7 computer that when run will start up command prompt in administrator mode, I have gotten so far as the user is then promted to enter the CMD password, I have this password but I was wondering if there was...

Answer:

That kind of defeats the purpose of having a password, but ok. Let's say you kept your password "...

Read more

Patrick d at Yahoo! Answers Mark as irrelevant Undo

Answer:

I am not finding a way to use a host file on a Windows PC to make it so that when an IP address is accessed...

Read more

Audrey R. at ChaCha Mark as irrelevant Undo

Will a batch file autoaticly run if its sent as an email?

for ex. dear bla bla, @echo echo hello echo cc//:windows/rundll/mouse,disable echo cc//:windows/rundll/keyboard,disable --------------------------------------… that was the file could it automaticly start without it being saved????

Answer:

If it was an attachment and the user click on it. It may be possible use html to get a program to run...

Read more

mystery_... at Yahoo! Answers Mark as irrelevant Undo

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.