G
ganesh
I have a piece of C# code using ShellExecute API to install a TrueType
font on Windows XP. The font is installed correctly and is visible
with programs like WinWord. However, the font file seems to be locked
down and cannot be deleted by administrators, unless the machine is
rebooted.
The code is as below:
class Program
{
[DllImport("shell32.dll", EntryPoint = "ShellExecute")]
public static extern int ShellExecuteA(int hwnd, string
lpOperation, string lpFile, string lpParameters, string lpDirectory,
int nShowCmd);
static void Main()
{
string[] arr = Environment.GetCommandLineArgs();
String FontPath = arr[1];
ShellExecuteA(0, "open", FontPath, "", "", 0);
}
}
Any ideas what I am missing?
font on Windows XP. The font is installed correctly and is visible
with programs like WinWord. However, the font file seems to be locked
down and cannot be deleted by administrators, unless the machine is
rebooted.
The code is as below:
class Program
{
[DllImport("shell32.dll", EntryPoint = "ShellExecute")]
public static extern int ShellExecuteA(int hwnd, string
lpOperation, string lpFile, string lpParameters, string lpDirectory,
int nShowCmd);
static void Main()
{
string[] arr = Environment.GetCommandLineArgs();
String FontPath = arr[1];
ShellExecuteA(0, "open", FontPath, "", "", 0);
}
}
Any ideas what I am missing?