Shell command not working at all

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to call an exe using the shell command, but it is not working. I
thought it may have been an office 2003 sp2 error because I can call the
shell ok from my office 2k2 machine. I have reformatted and loaded everything
from scratch, but shell still refuses to call. Any suggestions as to why this
might be?
 
Yes, to all intents and purposes the machines and set-ups are identical aside
from one machine having office 2k2 and the problem one having office 2003
 
Are you getting an error, or is it just ignoring you?
Is is possible the process is running but not visible?
Try adding this to you shell function as the window style argument:
vbMaximizedFocus
Also, after you execute the Shell function, open the task manager to be sure
it is not actually running.
 
No, it's not running, it's not reporting an error, it's doing nothing at all.

When I execute a shell command from the immediate window, i see [running]
appear for less than half a second, then nothing. No error, no process, no
nothing...
 
If you see the [running], then is it possible the application you are running
is bombing out?
Are you providing any command line options? Are any required?
Have you tried shelling to a different application to see if possibly it is
the application and not the shell command?

Sorry to ask so many obvious questions, but not being there it is difficult
to know exactly what is happening.

hfnet said:
No, it's not running, it's not reporting an error, it's doing nothing at all.

When I execute a shell command from the immediate window, i see [running]
appear for less than half a second, then nothing. No error, no process, no
nothing...

Klatuu said:
Are you getting an error, or is it just ignoring you?
Is is possible the process is running but not visible?
Try adding this to you shell function as the window style argument:
vbMaximizedFocus
Also, after you execute the Shell function, open the task manager to be sure
it is not actually running.
 
No weird stuff here at all. I am testing by calling Shell ("Notepad.exe",
vbNormalFocus) in Access, and nothing.

BUT

it is working in vb6, so it appears that the fault lies with Office, or
Access at least.

Klatuu said:
If you see the [running], then is it possible the application you are running
is bombing out?
Are you providing any command line options? Are any required?
Have you tried shelling to a different application to see if possibly it is
the application and not the shell command?

Sorry to ask so many obvious questions, but not being there it is difficult
to know exactly what is happening.

hfnet said:
No, it's not running, it's not reporting an error, it's doing nothing at all.

When I execute a shell command from the immediate window, i see [running]
appear for less than half a second, then nothing. No error, no process, no
nothing...

Klatuu said:
Are you getting an error, or is it just ignoring you?
Is is possible the process is running but not visible?
Try adding this to you shell function as the window style argument:
vbMaximizedFocus
Also, after you execute the Shell function, open the task manager to be sure
it is not actually running.

:

Yes, to all intents and purposes the machines and set-ups are identical aside
from one machine having office 2k2 and the problem one having office 2003

:

Is the executible located on the same path on both machines?

:

I am trying to call an exe using the shell command, but it is not working. I
thought it may have been an office 2003 sp2 error because I can call the
shell ok from my office 2k2 machine. I have reformatted and loaded everything
from scratch, but shell still refuses to call. Any suggestions as to why this
might be?
 
hfnet said:
No, it's not running, it's not reporting an error, it's doing nothing at all.

When I execute a shell command from the immediate window, i see [running]
appear for less than half a second, then nothing. No error, no process, no
nothing...
Are you getting an error, or is it just ignoring you?
Is is possible the process is running but not visible?
[quoted text clipped - 13 lines]

Can you run the .exe from a command line?
What is the .exe you're trying to run?
Is it possible the .exe doesn't work?
 
I am on Office 2003 SP 1 with Access 2003 and it works for me. If there is
an SP2 problem, I have not heard about it. Have you browsed MSDN to see if
there is any known problem? What happens if you try to execute it from
Windows with Start->Run, and executing it from there?

hfnet said:
No weird stuff here at all. I am testing by calling Shell ("Notepad.exe",
vbNormalFocus) in Access, and nothing.

BUT

it is working in vb6, so it appears that the fault lies with Office, or
Access at least.

Klatuu said:
If you see the [running], then is it possible the application you are running
is bombing out?
Are you providing any command line options? Are any required?
Have you tried shelling to a different application to see if possibly it is
the application and not the shell command?

Sorry to ask so many obvious questions, but not being there it is difficult
to know exactly what is happening.

hfnet said:
No, it's not running, it's not reporting an error, it's doing nothing at all.

When I execute a shell command from the immediate window, i see [running]
appear for less than half a second, then nothing. No error, no process, no
nothing...

:

Are you getting an error, or is it just ignoring you?
Is is possible the process is running but not visible?
Try adding this to you shell function as the window style argument:
vbMaximizedFocus
Also, after you execute the Shell function, open the task manager to be sure
it is not actually running.

:

Yes, to all intents and purposes the machines and set-ups are identical aside
from one machine having office 2k2 and the problem one having office 2003

:

Is the executible located on the same path on both machines?

:

I am trying to call an exe using the shell command, but it is not working. I
thought it may have been an office 2003 sp2 error because I can call the
shell ok from my office 2k2 machine. I have reformatted and loaded everything
from scratch, but shell still refuses to call. Any suggestions as to why this
might be?
 
ANY exe

Adam Turner via AccessMonster.com said:
hfnet said:
No, it's not running, it's not reporting an error, it's doing nothing at all.

When I execute a shell command from the immediate window, i see [running]
appear for less than half a second, then nothing. No error, no process, no
nothing...
Are you getting an error, or is it just ignoring you?
Is is possible the process is running but not visible?
[quoted text clipped - 13 lines]
from scratch, but shell still refuses to call. Any suggestions as to why this
might be?

Can you run the .exe from a command line?
What is the .exe you're trying to run?
Is it possible the .exe doesn't work?
 
I've looked everywhere and can't see an answer. Thsi is not exclusive to my
exe, it is EVERY exe or anything I try to call from within Office. The shell
command is the problem, not the app, it seems.

Klatuu said:
I am on Office 2003 SP 1 with Access 2003 and it works for me. If there is
an SP2 problem, I have not heard about it. Have you browsed MSDN to see if
there is any known problem? What happens if you try to execute it from
Windows with Start->Run, and executing it from there?

hfnet said:
No weird stuff here at all. I am testing by calling Shell ("Notepad.exe",
vbNormalFocus) in Access, and nothing.

BUT

it is working in vb6, so it appears that the fault lies with Office, or
Access at least.

Klatuu said:
If you see the [running], then is it possible the application you are running
is bombing out?
Are you providing any command line options? Are any required?
Have you tried shelling to a different application to see if possibly it is
the application and not the shell command?

Sorry to ask so many obvious questions, but not being there it is difficult
to know exactly what is happening.

:

No, it's not running, it's not reporting an error, it's doing nothing at all.

When I execute a shell command from the immediate window, i see [running]
appear for less than half a second, then nothing. No error, no process, no
nothing...

:

Are you getting an error, or is it just ignoring you?
Is is possible the process is running but not visible?
Try adding this to you shell function as the window style argument:
vbMaximizedFocus
Also, after you execute the Shell function, open the task manager to be sure
it is not actually running.

:

Yes, to all intents and purposes the machines and set-ups are identical aside
from one machine having office 2k2 and the problem one having office 2003

:

Is the executible located on the same path on both machines?

:

I am trying to call an exe using the shell command, but it is not working. I
thought it may have been an office 2003 sp2 error because I can call the
shell ok from my office 2k2 machine. I have reformatted and loaded everything
from scratch, but shell still refuses to call. Any suggestions as to why this
might be?
 
hfnet said:
ANY exe
[quoted text clipped - 11 lines]
What is the .exe you're trying to run?
Is it possible the .exe doesn't work?

It doesn't sound like it's Shell() related. It sounds like an OS issue. If
you can't run .exe's from the command line, you need to talk to your network
administrator to have that issue resolved.
 
I have reformatted today to a clean install. Everything has been installed
form scratch. I can run shell from vb6 and from any other app, but I cannot
shell from vba in access. That's what leads me to believe it's an ms access
issue. I am system administrator, so no issues with permissions or similar...

Adam Turner via AccessMonster.com said:
hfnet said:
ANY exe
No, it's not running, it's not reporting an error, it's doing nothing at all.
[quoted text clipped - 11 lines]
What is the .exe you're trying to run?
Is it possible the .exe doesn't work?

It doesn't sound like it's Shell() related. It sounds like an OS issue. If
you can't run .exe's from the command line, you need to talk to your network
administrator to have that issue resolved.
 
hfnet said:
I have reformatted today to a clean install. Everything has been installed
form scratch. I can run shell from vb6 and from any other app, but I cannot
shell from vba in access. That's what leads me to believe it's an ms access
issue. I am system administrator, so no issues with permissions or similar...
[quoted text clipped - 7 lines]
you can't run .exe's from the command line, you need to talk to your network
administrator to have that issue resolved.

Could you paste the function/procedure into the forum?
 
Shell ("C:\WIndows\system32\mspaint.exe", vbNormalFocus)

This is the command. You can substitue any exe you like, it has the same
effect. This was working up until last week when it stopped. Now it doesn't
work any more and seems to be isolated to access, as the shell command works
for me in vb6

Adam Turner via AccessMonster.com said:
hfnet said:
I have reformatted today to a clean install. Everything has been installed
form scratch. I can run shell from vb6 and from any other app, but I cannot
shell from vba in access. That's what leads me to believe it's an ms access
issue. I am system administrator, so no issues with permissions or similar...
[quoted text clipped - 7 lines]
you can't run .exe's from the command line, you need to talk to your network
administrator to have that issue resolved.

Could you paste the function/procedure into the forum?
 
This works fine for me in Access

Call Shell("mspaint.exe", vbNormalFocus)
Shell ("C:\WIndows\system32\mspaint.exe", vbNormalFocus)

This is the command. You can substitue any exe you like, it has the same
effect. This was working up until last week when it stopped. Now it doesn't
work any more and seems to be isolated to access, as the shell command works
for me in vb6
[quoted text clipped - 8 lines]
Could you paste the function/procedure into the forum?
 
Back
Top