Solved

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

Posted on 2004-09-06
3
211 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
[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
  • 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

Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I'm a big fan of Windows' offline folder caching and have used it on my laptops for over a decade.  One thing I don't like about it, however, is how difficult Microsoft has made it for the cache to be moved out of the Windows folder.  Here's how to …
Resolve DNS query failed errors for Exchange
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

726 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