473,563 Members | 2,696 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5057
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*********@Aw ayWithYerCrap.c om> 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
2715
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 differentiate batch files between the two prompts? Also, where might I find information on the differences between the 2 prompts? Thanks, Herb
1
15177
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 Access, the Shell window becomes a blip on the screen and then is gone. Why does the Shell window not stay open on the screen? I want to visually...
4
2102
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 user id, & run a batch file on their PC with that user id actually inside the batch file. (The objective here is to map a user to a drive on the...
1
1383
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 create a text file called MameGames.cfg. Later on in my code I parse through the file and pull out information. This all worked great but the file is...
3
2044
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. With a report, I need to calculate and display the difference in date / times between like batch numbers, ie displaying batch number, start date &...
3
6648
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 Image im = Image.open('small.tif') with an 'cannot identify image file' error message. I'm able to open .jpg
10
4471
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 web, to a MS SQL database, in this case version 2K? Thoughts, ideas?
2
2569
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 program logic moves to the classes/methods that execute the batch (instead of s normal, GUI driven program execution). Should an error occur somewhere...
0
1530
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 & Databases in each server and out put should send to txt file... Is it possible to do this using Batch file??? if possible hw can i???
0
7583
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7885
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7638
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6250
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3642
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
923
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.