473,408 Members | 2,888 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Run Windows 7 SoundRecorder.exe from within access

I tried to run SoundRecorder.exe (located in C:\Windows\System32\SoundRecorder.exe) in windows 7 using a command box in access but for some strange reason I get a Run time 53 error saying that the file was not found.

Expand|Select|Wrap|Line Numbers
  1. -----------------
  2. Code: 
  3. Call Shell("C:\Windows\System32\SoundRecorder.exe", 1)
  4. -----------------
when I use the mspaint.exe instead of SoundRecorder.exe in the code above the Paint starts normally.

Also, when I type
C:\Windows\System32\SoundRecorder.exe
in Windows>Run the sound recorder starts normally.

I have spent days trying to figure out what is happening with the SoundRecorder.exe. I even tried to create a bat file to launch it from access and again, when the bat file is manually clicked the Soundrecorder starts normally but when the bat file is invoked from within access it again pops up an error saying the windows cannot find "SoundRecorder.exe"

Any help?
Aug 2 '13 #1
16 5272
jimatqsi
1,271 Expert 1GB
Experiment a bit. Try moving the .exe into the same folder as the Access program. If it works there it may indicate there's a problem with permissions. Are you on a network or a standalone workstation?

You might find something helpful in the Windows log file.
Aug 2 '13 #2
Thanks jimatqsi.
I tried to copy/paste the SoundRecorder.exe in the database location. No "file not found" error but of course the SoundRecorder.exe doesn't run. I read somewhere that the root of the problem is Windows 64bit ( http://www.kirbyfooty.com/forum/inde...pic=669.0;wap2) and tried a couple of workarounds but with no lack.

PS 1. I don't know how to deal with windows log file
PS 2. I am on a standalone pc (Win 7 x64).


@jimatqsi
Aug 2 '13 #3
jimatqsi
1,271 Expert 1GB
After reading that and taking it at face value, I think you might want to search for FreeSoundRecorder.exe on the net. See if that will work for your application.
Aug 2 '13 #4
zmbd
5,501 Expert Mod 4TB
Windows7 did a few things with security behind the scenes and much of this has not been explained.
We ran into a similar issue with an instrument control program. Appears that Win7-64 will sometimes handle a wrong path and sometimes wont - don't ask, we (read my company’s IT, their IT, and myself) still don't get it!

Before you go downloading another program: You might just do a search on the drive for where "SoundRecorder.exe" is actually located. I think it was moved, I am however at home and on a WinXP OS (at work Win7-64) or I would take a peek at it myself :-(

Also hang tight for a short while, someone else here may have a better way to shell out the call to the SoundRecorder.exe that is more reliable.
Aug 2 '13 #5
@jimatqsi
I might go for HarddiskOgg (http://www.fridgesoft.de/news.php). Thanks anyway
Aug 2 '13 #6
BikeToWork
124 100+
Try c:\windows\system32\. That is where SoundRecorder.exe is located on my Win7/64 computer.
Aug 2 '13 #7
@zmbd

It is completely insane. I created a .bat file with:

Expand|Select|Wrap|Line Numbers
  1. @echo off
  2. cd C:\Windows\System32\
  3. start SoundRecorder.exe
  4.  
When I click the bat file, the SoundRecorder starts. When I call the bat file from within access I get an error.

~XC
Aug 2 '13 #8
@ BikeToWork

As mentioned in my first post, I use the c:\windows\system32\ directory
Aug 2 '13 #9
BikeToWork
124 100+
Sorry about that @accessnewbie90. For some reason I thought you were trying C:\Windows\SoundRecorder.exe. I have Windows 7 64 bit and Access 2007. When I make a function with the same code as yours (Call Shell("C:\windows\system32\soundrecorder.exe", vbMaximizedFocus), I got runtime error 53 - File not Found. If I paste the same path (C:\windows\system32\soundrecorder.exe) into the "Run" field, it opens fine. This is indeed strange.
Aug 2 '13 #10
BikeToWork
124 100+
I copied soundrecorder.exe to my D: drive and it opens fine from the Shell command in Access. It must be a Windows 7 security "feature" on the System32 folder.
Aug 2 '13 #11
zmbd
5,501 Expert Mod 4TB
From the little bit of research and some supposition on my part, it does appear to be a setting within the System32 folder.

When you ran the batch file how did you call it within VBA?
Expand|Select|Wrap|Line Numbers
  1. Call Shell([pathtobatchfile], 1)
Aug 2 '13 #12
zmbd
5,501 Expert Mod 4TB
I know what happened:
You got hit with the EXACT same thing that we did in the lab with the instrument software!

I had one of my collegues lookup how we solved the issue in the lab (good to keep notes).

I then had him check the for the soundrecorder in the SysWOW64 on our Win7(64), and sure enough, there it sits.

Here's the information that helped us solve the problem back then... (Sorry, I'd forgotten exactly how we solved the issue, been too many years and too many projects, and three kids! I should have checked my notes sooner; however, I'm not at work and they are not as easy to get to!)

Calling a 32bit System Command in a Script in x64 windows
Let’s say you’ve written a little 32-bit script that calls a Windows command such as nbtstat. When you try to run the script in x64 Windows, you get an annoying “File not found” error – even though you can see the command sitting in the \Windows\system32 folder.

What’s going on here?

x64 version of Windows have two system folders: \Windows\system32 and \Windows\SysWOW64.

The 32-bit commands are in the SysWOW64 folder, and the 64-bit commands are stored in the system32 directory. x64 Windows looks in system32 by default when you call a command line function, since it tries to call the 64-bit goodies (no, that’s not backwards!).

So, you might think that you can simply change your script to explicitly call, for example, \Windows\system32\nbtstat instead of just nbtstat, and you’ll be off and running, right? Wrong.(...)
So, try the path "c:\windows\sysnative\SoundRecorder.exe" and see if this works.

If so, then you can modify the Ruby code given for VBA to check for the SysWow64 directory using the DIR() function and then either execute the call based on the straght System32 folder if it doesn't exsit or call the Above link
Aug 2 '13 #13
@ zmbd

Thanks for taking the time to address the problem. I tried the path "c:\windows\sysnative\SoundRecorder.exe" and I got a:

Run-time error "5"
Invalid procedure call or argument


I am now using a free alternative to SoundRecorder and it works just fine. It is still weird though that there is no problem with other windows apps (like MSpaint for example). Only SoundRecorder seems to have this problem.
Aug 2 '13 #14
zmbd
5,501 Expert Mod 4TB
Given that you were getting: "Run time 53 error saying that the file was not found."

The runtime 5 error indicates that you attempted to pass an argument that Shell() doesn't understand and it must have found the soundrecorder.exe or you would have received a different error... more than likely the 53 again.

SO I wonder are you trying to use one of the built in constaint such as "vbMaximizedFocus?" IF so the you may have to use the numeric "1" - Win7(64) has some quirks like that.

The other thing is how your quotes are being used and if there are any spaces and they are being used in the call to the program.

Would you please post the actual code that caused the error?
Aug 3 '13 #15
@zmbd

Here it is:
Expand|Select|Wrap|Line Numbers
  1. Call Shell("c:\windows\sysnative\SoundRecorder.exe", 1) 
Aug 13 '13 #16
zmbd
5,501 Expert Mod 4TB
The VBA ran just fine on my PC, other than I don't have a mic plugged into my PC ( :) ), when I executed the Call Shell("c:\windows\sysnative\SoundRecorder.exe", 1) in a standard module in MS-Access, Excel, and Word all Office 2010(32Bit) on a Win7-64Bit os.

There must be more to the situation on your PC than we are currently aware of?
Aug 13 '13 #17

Sign in to post your reply or Sign up for a free account.

Similar topics

14
by: jj | last post by:
Is it possible to call a remote php script from within Access? I'm thinking something like: DoCMD... http://www.domain.com/scripts/dataquery.php DoCmd.OpenQuery "update_data", acNormal, acEdit...
1
by: Orjan | last post by:
Does anybody have a suggestion of a software or component to use if you want to display JPEG or TIFF images in a control within Access? I know that Office can do this but my customer don't want to...
1
by: Brian | last post by:
Greetings all! I've been searching and searching for about two hours looking for advise, help, tips for viewing an Outlook calendar (any view, month, week, day) from within Access. I've noticed...
3
by: Rick | last post by:
Does anyone have a bit of sample code to use with Access 2000 in order to use the Windows API to change an external file name or file name extension? For example, if I export a query to a text...
3
by: PSD | last post by:
I am trying to link an access database directly to individual polygons or points (PGDB) in Arcmap, that is when opened the Access link would open Archmap and then zoom to the polygons or points...
10
by: Nader | last post by:
Hello, I'd like to send command or message within access to other users who are connected to the same mdb file. Is that possible ? thanks in advance. Nader
2
by: jake_allen_no_spam | last post by:
Hi All How do you run an external windows command in Microsoft Access. I have a VBA script and I want to start internet explorer from within Access. Is there a run host command to start a...
6
by: Sanka | last post by:
Is there anyway of carrying out Windows Macros in Access Thanks Sanka
1
by: AngieMP | last post by:
Hi Guys I have inherited an Access DB in a very poorly state! I have offered to make some changes to it for a local charity but have got stuck on this error it seems to be creating for all new...
1
by: Drews | last post by:
Many thanks to PuppyDogBuddy or the reference to code samples to send an email and an attachment from within Access, all up and running. However I'm having trouble adding multiple attachments....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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...
0
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
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...

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.