473,387 Members | 1,532 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

A97 - Open & Run Code from Batch File?

I have some code in my app that updates data by interrogating data from
Artemis. It works fine, but I wondered if I'd be able to write a batch file
which, at a predetermined time each day, would open the app 'silently' and
run the code.

I'm no whizz at batch files/DOS commands, but I've written them to open an
Access app - it's the rest of it that I need advice about. How would I get
the app to recognise that it was opened by the batch file, run the code and
then close itself?

Many thanks.
Keith.
Nov 12 '05 #1
3 5049
Keith,
I guess a possibility would be to run a macro?
Use the switch /x macroname in your commandline.
This means that this specific macro will run.
This macro calls a specific updateprocedure (function) and closes the app afterwards.

--
Hope this helps
Arno R

"Keith Wilby" <ke*********@AwayWithYerCrap.com> schreef in bericht
news:Xn************************@10.15.188.42...
I have some code in my app that updates data by interrogating data from
Artemis. It works fine, but I wondered if I'd be able to write a batch file
which, at a predetermined time each day, would open the app 'silently' and
run the code.

I'm no whizz at batch files/DOS commands, but I've written them to open an
Access app - it's the rest of it that I need advice about. How would I get
the app to recognise that it was opened by the batch file, run the code and
then close itself?

Many thanks.
Keith.

Nov 12 '05 #2
"Arno R" <ar****************@tiscali.nl> wrote:
I guess a possibility would be to run a macro?


Hi, thanks for that.

I've had a think and decided that the way to go is to have a dummy user
account and open the app from the batch file using this account. The code
will then know from the CurrentUser function that it is being opened by the
batch file.

Regards,
Keith.
Nov 12 '05 #3
> I've had a think and decided that the way to go is to have a dummy user
account and open the app from the batch file using this account. The code
will then know from the CurrentUser function that it is being opened by the
batch file.


Whatever option suits you best, it's you to decide.
As we say here in Holland: "there are more ways that lead to Rome" ;-)

Arno R
Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Herb Stevenson | last post by:
Hello all. I need to set up a batch file to work w/ the Visual Studio.NET 2003 command prompt. However, when I run the batch file it uses the standard command prompt. Is there a way to...
1
by: Rob | last post by:
I'm running a batch file using the Shell function. When I manually launch the batch file, the window remains open, since I use the 'pause' statement. But when I launch the batch file within...
4
by: Jason Shohet | last post by:
A user runs a .NET application that authenticates them against active directory (they're coming in over VPN so they don't log on to the network normally). Once they log in, I want to take their...
1
by: jcrouse | last post by:
This is sort of a revisited item from about two months ago (don't get mad Cor) with additional code. I am creating a batch file called CreateMameGames.bat. I am then running that batch file to...
3
by: Stephen | last post by:
Hi, I have a table consists which cosists of batch numbers, and assosiated dates and times..ie the columns are batch, date and time. The data within the table is not in any particular order. ...
3
by: Andres Corrada-Emmanuel | last post by:
Hello, I have installed PIL 1.1.5 on Windows with Python 2.4. I'm unable to open .tiff images that I can open and view using Windows Explorer. In other words, this simple test fails: import...
10
by: Zamdrist | last post by:
http://www.treas.gov/offices/enforcement/ofac/sdn/ I wonder if it my be conceivable/practical to import on a regular basis, hands-off, the XML version of this list directly from it's source, the...
2
by: Jeroen | last post by:
Here's the situation. My program will be able to start with an argument (a path to a file) and then run a batch of commands in that file. So if an argument is provided to the main method, the...
0
by: raghutumma | last post by:
Hi, I need help from you... I want to find SQL Servers which are available in Network and Databases in Each Server Using Batch file. If i run this Batch file it should find SQL Servers &...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.