How to install a windows font using C#

You’ll need a different approach installing fonts. Use an installer (create a setup project) to install the fonts Another (more easy) approach using a native method. Declare the dll import: [DllImport(“gdi32.dll”, EntryPoint=”AddFontResourceW”, SetLastError=true)] public static extern int AddFontResource( [In][MarshalAs(UnmanagedType.LPWStr)] string lpFileName); In your code: // Try install the font. result = AddFontResource(@”C:\MY_FONT_LOCATION\MY_NEW_FONT.TTF”); error = Marshal.GetLastWin32Error(); … Read more

PSEXEC, access denied errors

Hi i am placing here a summary from many sources online for various solutions to “access is denied” : most information can be found here (including requirements needed) – sysinternal help as someone mentioned add this reg key, and then restart the computer : reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f Read … Read more

getting access is denied error on IE8

IE doesn’t allow manipulation of the type=”file” input element from javascript due to security reasons. Setting the filename or invoking a click event to show the browser dialog will result in an “Access is denied” error on the form submit – Internet Explorer is clever about remembering what methods have been invoked. Similar issue: http://www.webdeveloper.com/forum/showthread.php?t=181272

“Connect failed: Access denied for user ‘root’@’localhost’ (using password: YES)” from php function [duplicate]

I solved in this way: I logged in with root username mysql -u root -p -h localhost I created a new user with CREATE USER ‘francesco’@’localhost’ IDENTIFIED BY ‘some_pass’; then I created the database CREATE DATABASE shop; I granted privileges for new user for this database GRANT ALL PRIVILEGES ON shop.* TO ‘francesco’@’localhost’; Then I … Read more