Re: Shell function strange behaviour
- From: Max Vit <mvit@xxxxxxxxxxxxx>
- Date: Thu, 2 Oct 2008 14:36:02 -0700 (PDT)
Hi Chris - This is what i have tried:
Shell "cmd /k c:\WINDOWS\System32\sample.bat"
-AND-
Shell "c:\WINDOWS\System32\cmd /k sample.bat"
-AND-
Shell "c:\WINDOWS\System32\cmd /k c:\WINDOWS\System32\sample.bat"
The result is still the same :-(
'c:\WINDOWS\System32\sample.bat' is not recognized as an internal or
external command, operable program or batch file.
I use the '/k' so the command windows is kept open; and on every
instance, doing a DIR on C:\WINDOWS\System32 for sample.bat brings no
results even though the file is there.
BTW, 'cmd.exe' it's on the same folder so I am really struggling to
understand what's going on.
Furthermore, the Start > Run > cmd will show this PATH:
PATH=C:\Program Files (x86)\PC Connectivity Solution\;C:\WINDOWS
\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files
(x86)\ATI Technologies\ATI.ACE\Core-Static;C:\WINDOWS\sysWOW64
And the Shell "cmd /k" will show a different PATH (as you correctly
suggested) but that still contains C:\WINDOWS\System32:
PATH=C:\Program Files (x86)\Microsoft Office\OFFICE11\;C:\Program
Files (x86)\PC Connectivity Solution\;C:\WINDOWS\system32;C:\WINDOWS;C:
\WINDOWS\System32\Wbem;C:\Program Files (x86)\ATI Technologies\ATI.ACE
\Core-Static;C:\WINDOWS\sysWOW64
I have even set the PATH temporarily to only look at C:\WINDOWS
\System32 but the result is the same.
It looks that there must be some permission issue for sample.bat when
it is placed on the System32 folder; so when Shell "cmd /k" is
executed somehow it is not authorised to 'see' that sample.bat is in
System32.
However, if I place sample.bat on i.e. C:\ then the problem is gone.
.
- Follow-Ups:
- Re: Shell function strange behaviour
- From: Chris O'C via AccessMonster.com
- Re: Shell function strange behaviour
- References:
- Shell function strange behaviour
- From: Max Vit
- Re: Shell function strange behaviour
- From: Chris O'C via AccessMonster.com
- Shell function strange behaviour
- Prev by Date: report trouble on Dell laptop
- Next by Date: Re: How to copy a mdb file with VBA code
- Previous by thread: Re: Shell function strange behaviour
- Next by thread: Re: Shell function strange behaviour
- Index(es):
Relevant Pages
|
Loading