Solved

trying to run from a service a .bat file as administrator so it shows on desktop

Posted on 2004-09-06
3
175 Views
Last Modified: 2010-03-18
Hi. I have a .bat file that works fine if I click it, but when I try to run it from a program I found (QueIt) which is installed on another lan machine as a service, the .bat runs but it is invisible. It does show up in task manager under processes. How can I make this run and appear on the desktop? I need to shut down access, then copy a file from our server, then restart access so when the pc user gets to the office in the morning, it is open and waiting for them. Thanks.

we have w2k

here is the .bat:

Kill.exe -f msaccess.exe
copy \\OURSERVER\ourserversfolder\ouraccessdb.mdb c:\thismachinesfolder\ouraccessdb.mdb
start msaccess.exe C:\thismachinesfolder\ouraccessdb.mdb
0
Comment
Question by:horstuff
  • 2
3 Comments
 
LVL 15

Expert Comment

by:adamdrayer
ID: 11993002
try calling:
cmd /C whatever.bat
0
 
LVL 4

Expert Comment

by:jonnietexas
ID: 11993393
I would use a call statement before the copy.  Also, you will probably need a /y switch in order to force the copy if the file exists.
0
 
LVL 15

Accepted Solution

by:
adamdrayer earned 125 total points
ID: 11993492
good call on the /y.

the CALL statement, however, is how you would run a batch file from within a batch file, and have the execution return properly.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Nslookup is a command line driven utility supplied as part of most Windows operating systems that can reveal information related to domain names and the Internet Protocol (IP) addresses associated with them. In simple terms, it is a tool that can …
Resolve DNS query failed errors for Exchange
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now