Re: Modify VSTO addin's manifest to work it as Invoker

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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,

.



Relevant Pages

  • Re: Write access denied when limited privilege.
    ... There is no such thing done as writing .exe files or writing in a systems ... > Note that writing to Program Files is a classic logo-blocking issue, ... > you ever wanted to obtain the "Made for XP" logo. ... >> your app that you need to fix. ...
    (microsoft.public.windowsxp.security_admin)
  • Re: office 2000 compatibility
    ... I can't answer all your questions, but the most immediate ones... ... > I am writing a COM addin and it must be compatible with Word 2000. ... This reply is posted in the Newsgroup; please post any follow question or reply ...
    (microsoft.public.office.developer.office.sdks)
  • Re: preventing addIn opening in second instance of Excel?
    ... Could the problem you described with your own addin also occur with any ... A small thing to be aware of writing is something like "my addin is ... You suggest aborting routines I don't want to process. ... As for writing the 'few small details' into registry I've always ...
    (microsoft.public.excel.programming)
  • Commandbar Question
    ... Writing an addin, I'm adding a button to the File menu. ... "File" commandbar using CommandBars. ... work with the FindControl method instead? ...
    (microsoft.public.word.vba.general)
  • Commandbar Question
    ... Writing an addin, I'm adding a button to the File menu. ... "File" commandbar using CommandBars. ... work with the FindControl method instead? ...
    (microsoft.public.word.vba.general)