NickOhara / audioswitch

Automatically exported from code.google.com/p/audioswitch
0 stars 0 forks source link

Could not find nbspkrs.ico #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Using version 1.42, extracted the zip file and ran AudioSwitch.exe. Upon 
clicking the icon, I receive an error stating Could not find file 
c:\Windows\system32\nbspkrs.ico even though it is there.

I am running Windows 8 Pro x64. I did verify that the file exists.

Here is the detail for the error:

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.FileNotFoundException: Could not find file 
'C:\Windows\system32\nbspkrs.ico'.
File name: 'C:\Windows\system32\nbspkrs.ico'
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at System.Drawing.Icon..ctor(String fileName, Int32 width, Int32 height)
   at AudioSwitch.DeviceIcons.Add(String iconPath)
   at AudioSwitch.EndPoints.RefreshDevices(EDataFlow renderType, Boolean updateIcons)
   at AudioSwitch.FormSwitcher.RefreshDevices(Boolean UpdateListView)
   at AudioSwitch.FormSwitcher.notifyIcon1_MouseDown(Object sender, MouseEventArgs e)
   at System.Windows.Forms.NotifyIcon.OnMouseDown(MouseEventArgs e)
   at System.Windows.Forms.NotifyIcon.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.NotifyIcon.WndProc(Message& msg)
   at System.Windows.Forms.NotifyIcon.NotifyIconNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18033 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
AudioSwitch
    Assembly Version: 1.42.0.0
    Win32 Version: 1.42
    CodeBase: file:///C:/Users/harrison/Downloads/AudioSwitch%20v1.42/AudioSwitch.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18037 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18022 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18033 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18033 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Original issue reported on code.google.com by harrison...@gmail.com on 7 Mar 2013 at 4:03

GoogleCodeExporter commented 9 years ago
System32 folder does not give proper reading access for user-level 
applications. I'm using Windows folder for my own icons and it works properly. 
Changing icon file security settings doesn't matter, it's about the folders the 
icons are stored. Try putting the icons to either Windows folder or another 
user-accessible folder. Another option would probably be to run AudioSwitch as 
administrator, but it's inconvenient and otherwise unnecessary.

Original comment by tanelte...@gmail.com on 7 Mar 2013 at 4:36

GoogleCodeExporter commented 9 years ago
AudioSwitch looks like it hard codes the path it is trying to get the icon 
from. Is there a way to have it look at the current path that AudioSwitch.exe 
is in. 

Basically all I did was to copy the nbspkrs.ico file to the folder, but 
AudioSwitch doesn't check there first.

Running AudioSwitch as an administrator didn't fix it. I had tried this before 
submitting the issue.

Original comment by harrison...@gmail.com on 7 Mar 2013 at 4:56

GoogleCodeExporter commented 9 years ago
it doesn't work this way - you have to change the actual device icon, 
AudioSwitch just uses the one that the interface gives. To set the device's 
icon: right-click the volume icon -> choose playback devices or recording 
devices -> double-click the device you want to change the icon -> click the 
button "Change Icon" -> browse for the icon. Now Windows considers this icon as 
the device's and AudioSwitch uses it as well.

Original comment by tanelte...@gmail.com on 7 Mar 2013 at 5:00

GoogleCodeExporter commented 9 years ago
Ah ok. It was HP's fault for putting a specific icon in there. I changed it to 
use the default speaker from whatever the dll was called.

Original comment by harrison...@gmail.com on 7 Mar 2013 at 5:09