Re: Modify VSTO addin's manifest to work it as Invoker
- From: "Ken Slovak - [MVP - Outlook]" <kenslovak@xxxxxxxx>
- Date: Mon, 17 Dec 2007 09:34:38 -0500
In almost all cases on Vista a program has no permissions to write to the Program Files hierarchy. It's also considered to be not a best practice to do that even where the OS doesn't prevent writing there. The best practice is considered to be writing things such as error logs to LocalAppData.
I'm not sure what you mean about changing the FolderPP class to inherit from UserControl, that's what it does now. The first code line in FolderPP.CS (and the equivalent in VB.NET) is:
public partial class FolderPP : UserControl
{
Which to me indicates that it inherits from System.Windows.Forms.UserControl.
Can you explain what you're seeing and what you're doing?
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
"Dhananjay" <pandit.dhananjay@xxxxxxxxx> wrote in message news:a825b74e-f953-42a2-b05e-e38d27309ceb@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thanks Ken, for your valuable reply.
I downloaded SDK & used orca to change the msi to "UAC Compliant".
Now it is not showing me the UAC dialog for "An unidentified program
wants to access your computer". Thanks for it.
But I want to modify my VSTO addin's manifest, so that I can run my
addin as a Invoker.
Basically, my addin writes the trace in the application directory.
This is my snippet for writing trace.txt file
Try
Dim fs As System.IO.StreamWriter
fs = IO.File.AppendText(AppPath & "\Trace.txt")
fs.WriteLine(Now & ": " & st)
fs.Close()
fs = Nothing
Catch ex as Exception
.....
Everytime there is an exception while writing to trace.txt file.
Someone told me that If my addin runs as a Invoker, then there will be
no problem.
Also I can not force to the client to install my addin in
AppDataFolder, so client installs the addin in "Program Files", where
my trace file is not generated.
I have set permission for my addin as "FullTrust" as required. I used
"SetSecurity" project for that.
Meanwhile, your project works fine on my machine after I changed your
FolderPP class to inherit from "System.Windows.Forms.UserControl" in
place of "System.Windows.Forms.Form".
Thanks again,
.
- Follow-Ups:
- Re: Modify VSTO addin's manifest to work it as Invoker
- From: Dhananjay
- Re: Modify VSTO addin's manifest to work it as Invoker
- References:
- Modify VSTO addin's manifest to work it as Invoker
- From: Dhananjay
- Re: Modify VSTO addin's manifest to work it as Invoker
- From: Ken Slovak - [MVP - Outlook]
- Re: Modify VSTO addin's manifest to work it as Invoker
- From: Dhananjay
- Modify VSTO addin's manifest to work it as Invoker
- Prev by Date: Re: How to detect flag event from vba?
- Next by Date: Re: What is the equivalent in O2K vb to "Sleep()"?
- Previous by thread: Re: Modify VSTO addin's manifest to work it as Invoker
- Next by thread: Re: Modify VSTO addin's manifest to work it as Invoker
- Index(es):
Relevant Pages
|