|
-
May 29th, 2012, 02:33 PM
#1
Thread Starter
New Member
[RESOLVED] MS-Access Shell not finding file on 64 bit
Hi All,
I have an Access app that shells out to run the file transfer program PSCP.exe. It runs fine on XP and Windows 7 32 bit machines.
On Windows 7 - 64 bit machines it runs fine from the command prompt but not when I shell out to it. My shell command is the same as I use for the XP machines:
x = shell("C:\BioRemote\BioSend.cmd",1)
One of the lines in the .cmd calls on the PSCP programs:
> C:\Windows\System32\PSCP.exe -pw PASSWORD DestPathFile SourcePathFile:
When the above line executes on a 64 bit machine from the Command window, it runs just like it should. But if I run the .cmd by shelling from Access's intermediate window, the message comes back:
"'C:\Windows\System32\PSCP.exe' is not recognized as an internal or external command, operable program or batch file."
Other commands within the .cmd such as "Ren a.txt b.txt" work fine, and other executables such as "C:\Program Files (x86)\VPN Client\vpnclient" also work fine.
Any help would be appreciated.
Al
-
May 29th, 2012, 04:09 PM
#2
Re: MS-Access Shell not finding file on 64 bit
what happens if you just run the .cmd file from the command line?
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
May 30th, 2012, 08:04 AM
#3
Thread Starter
New Member
Re: MS-Access Shell not finding file on 64 bit
Well, after many hours of futile attempts to determine the cause, it turns out that after I moved the PSCP.exe file out of C:\Windows\System32, the shell operation found the file just fine. There must be something "forbidden" about that system folder - Who'd a thunk it! - Al
-
May 30th, 2012, 04:16 PM
#4
Re: [RESOLVED] MS-Access Shell not finding file on 64 bit
There must be something "forbidden" about that system folder - Who'd a thunk it! - Al
par for the course, on 64 bit
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|