?
Solved

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

Posted on 2004-09-06
3
Medium Priority
?
233 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 500 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

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

Sometimes you might need to configure routing based not only on destination IP address, but also on a combination of destination IP address (or hostname) and destination port number. I will describe a method how to accomplish this with free tools. …
Have you ever set up your wireless router at home or in the office to find that you little pop-up bubble in the bottom right-hand corner of Windows read "IP Conflict - One of more computers on the network have been assigned the following IP address"…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

850 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