473,503 Members | 4,461 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Shell and Wait

I am using the code posted on the Access Web by Terry Kreft to shell and
wait for an application to finish before continuing. The application I am
shelling out to requires that the current directory be changed before it can
run successfully (because it calls another application using a relative
path). Can anyone post some advice that I could use to make this work.
Below is my code and the code from the Module.

----------------------------
My Form Code
----------------------------

strShellPathName = Mas_Scr_Hwd & "\PVXWIN32.EXE ..\LAUNCHER\SOTA.INI
...\SOA\MAS90 -ARG ..\vi\" & viJobID & " W O DIRECT " & viMode & " " &
MAS_SCR_CMP
ShellWait (strShellPathName)

----------------------------
End My Form Code
----------------------------
A link to the code by Terry is below. I don't think it would be appropriate
for me to re-post his code without his permission, but it's available at the
following website:

http://www.mvps.org/access/api/api0004.htm

Thanks in advance for any ideas.

Nov 12 '05 #1
2 9986
Daniel,
Interestingly I had a similar problem just this year, look at ChDrive and
ChDir to achieve this before your call to ShellWait.

Terry
"Daniel Thomas" <da****@goochsupport.com> wrote in message
news:vr************@corp.supernews.com...
I am using the code posted on the Access Web by Terry Kreft to shell and
wait for an application to finish before continuing. The application I am
shelling out to requires that the current directory be changed before it can run successfully (because it calls another application using a relative
path). Can anyone post some advice that I could use to make this work.
Below is my code and the code from the Module.

----------------------------
My Form Code
----------------------------

strShellPathName = Mas_Scr_Hwd & "\PVXWIN32.EXE ..\LAUNCHER\SOTA.INI
..\SOA\MAS90 -ARG ..\vi\" & viJobID & " W O DIRECT " & viMode & " " &
MAS_SCR_CMP
ShellWait (strShellPathName)

----------------------------
End My Form Code
----------------------------
A link to the code by Terry is below. I don't think it would be appropriate for me to re-post his code without his permission, but it's available at the following website:

http://www.mvps.org/access/api/api0004.htm

Thanks in advance for any ideas.

Nov 12 '05 #2
Response below.
I am using the code posted on the Access Web by Terry Kreft to shell and
wait for an application to finish before continuing. The application I am
shelling out to requires that the current directory be changed before it can
run successfully (because it calls another application using a relative
path). Can anyone post some advice that I could use to make this work.
Below is my code and the code from the Module.

----------------------------
My Form Code
----------------------------

strShellPathName = Mas_Scr_Hwd & "\PVXWIN32.EXE ..\LAUNCHER\SOTA.INI
..\SOA\MAS90 -ARG ..\vi\" & viJobID & " W O DIRECT " & viMode & " " &
MAS_SCR_CMP
ShellWait (strShellPathName)

----------------------------
End My Form Code
----------------------------


If the "relative path" is based on the location of pvxwin32.exe, then I suppose
you need to change the directory, prior to issuing the "ShellWait()" function
call, using:

'Ensure correct drive is the current drive
ChDrive Mas_Scr_Hwd
'Set current directory on current drive
ChDir Mas_Scr_Hwd

This is assuming that "Mas_Scr_Hwd" is a variable holding the path to the
referenced executable (the assumed baseline for the relative paths). Since I am
not familiar with the ProvideX software, you will need to refer to your user's
manual for more information.

--
Bruce M. Thompson, Microsoft Access MVP
bt******@mvps.org (See the Access FAQ at http://www.mvps.org/access)
NO Email Please. Keep all communications

within the newsgroups so that all might benefit.<<
Nov 12 '05 #3

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

Similar topics

9
6947
by: none | last post by:
Hello all, I wrote a shell program a few years ago in VB6 that needs to be modified. The problem I have is this: The SysAdmin uses this shell in place of Explorer, so there is no taskbar. When...
6
7630
by: Hugh Janus | last post by:
Hi group, I am executing a shell command that calls a .BAT file. I have to wait for this batch file to finish so I use the wait = true parameter in the shell command. However, this means that...
1
1819
by: mcmillanje | last post by:
HI! I'm hoping to make a simple c++ program to execute yafray, (xml based cgi renderer, I use it with blender). The syntax to enter in command prompt, (or dos, if you don't have windows open, or...
4
2604
by: jelle | last post by:
Hi, I use python quite a bit to couple different programs together. Doing so has been a _lot_ easier since subprocess came around, but would really like to be able to use the succinct shell...
3
1903
by: Rob R. Ainscough | last post by:
I have a Windows Service with a timer that use the .NET 2.0 Shell command. The Shell command returns a non-zero number but Task Manager shows the shelled exe running but there is NO visible...
12
2449
by: Krypto | last post by:
I have been using python shell to test small parts of the big program. What other ways can I use the shell effectively. My mentor told me that you can virtually do anything from testing your...
0
2635
by: edurran | last post by:
Hi all, I have spent the last three days on this problem. Looked in many forums and not found the answer as yet. Hopefully ye can help. I have two functions. One works fine, the second does...
25
62429
by: dennijr | last post by:
ok, shell always used to be easy for me, now its starting to get annoying cause i dont know wats wrong heres the simplist code possible: Private Sub IExplorer_Click() a = Shell("C:\Program...
1
3541
by: raocheng | last post by:
Please see the following code. Suppose I have many shell commands to be executed. And I don't want to fork a sub shell for each command(eg: status,output = commands.getstatusoutput(cmd)) because...
7
6201
by: Samuel A. Falvo II | last post by:
I have a shell script script.sh that launches a Java process in the background using the &-operator, like so: #!/bin/bash java ... arguments here ... & In my Python code, I want to invoke...
0
7258
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
7441
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
5558
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,...
1
4987
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...
0
4663
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
3156
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
3146
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1489
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 ...
0
366
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...

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.