473,503 Members | 1,501 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

O.T. - but stemming from an Access Application objective

MLH
I would like to launch an A97 runtime
application, doing one additional thing
immediately prior to launching.

Here's the Target property setting of
the desktop icon I now use to launch
the runtime app:

"C:\Program Files\AppDir\MyApp.mde"

What I want is to do immediately prior
to opening the A97 runtime application is
perform a simple DOS activity first: I want
to copy c:\FileA.ext to c:\FileB.ext. I want
to wait for the operation to complete before
launch of the runtime app.

Can someone recommend some kind of
windows batching method which would enable
me to copy my file and launch my A97 app by
dbl-clicking only a single icon on the desktop?
I heard windows XP had something like that
built-in. If it does, I can't find it.
Jun 2 '06 #1
3 1578
Study up vbscript. Batch files on steriods. Actually, most VB commands are
available, but in a file that you create in notepad and run just by invoking
the name, myscript.vbs for instance.

Warning: You can get annoying prompts about allowing macros to run. YOu
will have to change some settings if you have this problem.
Jun 2 '06 #2
You could write a windows script.

Using the run method of the WSript.Shell object you can tell it to wait
until the tak completes before continuing.

Something like:
' *********************************************
Dim wshShell
dim strShell1
dim strShell2
dim strshell3

Set WshShell = CreateObject("WScript.Shell")
' ****************************************
' You need to change these paths
Const FILE_SOURCE = """e:\automation\data\source.txt"""
Const FILE_TARGET = """e:\automation\archive\target.txt"""
CONST WINDOW_STYLE = 1
CONST WAIT_FOR_TASK = -1

' ************************************************** ***
' contracts3
strShell1 = "CMD /c DEL " & FILE_TARGET
strShell2 = "CMD /c copy " & FILE_SOURCE & ", " & FILE_TARGET
strshell3 = "c:\somedir\some.mdb"

On Error Resume Next
WshShell.Run strshell1, WINDOW_STYLE, WAIT_FOR_TASK

On Error GoTo 0
WshShell.Run strshell2, WINDOW_STYLE, WAIT_FOR_TASK

WshShell.Run strshell3, WINDOW_STYLE

SET WshShell = Nothing
' *********************************************

Alternatively you could instantiate a FileSystemObject in the scipt and use
that to copy the file.

Look in MSDN for more help

--

Terry Kreft
"MLH" <CR**@NorthState.net> wrote in message
news:br********************************@4ax.com...
I would like to launch an A97 runtime
application, doing one additional thing
immediately prior to launching.

Here's the Target property setting of
the desktop icon I now use to launch
the runtime app:

"C:\Program Files\AppDir\MyApp.mde"

What I want is to do immediately prior
to opening the A97 runtime application is
perform a simple DOS activity first: I want
to copy c:\FileA.ext to c:\FileB.ext. I want
to wait for the operation to complete before
launch of the runtime app.

Can someone recommend some kind of
windows batching method which would enable
me to copy my file and launch my A97 app by
dbl-clicking only a single icon on the desktop?
I heard windows XP had something like that
built-in. If it does, I can't find it.

Jun 2 '06 #3
"Rick Wannall" <wa*****@notadomain.de> wrote in
news:4r******************@newssvr14.news.prodigy.c om:
Study up vbscript. Batch files on steriods. Actually, most VB
commands are available, but in a file that you create in notepad
and run just by invoking the name, myscript.vbs for instance.


Well, you might need to specify the name of the scripting host if
the machine has been properly safeguarded to not execute VBS
automatically.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Jun 2 '06 #4

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

Similar topics

2
2180
by: Richard Hyett | last post by:
I dug out a PHP version of Porters Algorithm from :-http://www.tartarus.org/~martin/PorterStemmer/php.txt Whenever I try and run it I'm getting the error "Wrong parameter count for join() " ...
8
3350
by: mytfein | last post by:
Hi Everyone, Background: Another department intends to ftp a .txt file from the mainframe, for me to process. The objective is to write a vb script that would be scheduled to run daily to...
6
4993
by: daniel.sumanth | last post by:
Hello, Have customized the menu options in Access 2000 in a computer. However, it seems that the customizations apply only when I'm logged in and not to other users. Is there any way to use the...
4
3497
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The...
2
21857
by: Rich | last post by:
Greetings, I am trying to find a way to use a form of GetObject in VB.Net and have been researching WMI. Apparently, this is a vast subject, but seems to reference a Namespace called...
8
3124
by: carriolan | last post by:
Hi I have an MS Access based application almost ready for distribution to the public and I find that even though I have compiled it into an MDE file, tables and queries can still be be imported if...
35
2513
by: robert d via AccessMonster.com | last post by:
I was asked to provide a proposal. I provided a proposal on my application and the prospective client likes what I have but is wary of it having been developed in Access. I don't understand this...
22
6223
by: Jordan S. | last post by:
SQL Server will be used as the back-end database to a non trivial client application. In question is the choice of client application: I need to be able to speak intelligently about when one...
0
7089
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
7282
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,...
0
7339
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6995
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...
0
7463
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5581
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,...
0
4678
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...
0
3168
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...
0
1515
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.