A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Modify VSTO addin's manifest to work it as Invoker



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old December 7th 07, 01:47 PM posted to microsoft.public.outlook.program_vba
Dhananjay
external usenet poster
 
Posts: 33
Default Modify VSTO addin's manifest to work it as Invoker

Hi All,
I have developed one COM- addin in VSTO / VB 2005 / Office 2007. As we
know that, if we create a VSTO addin, then it is having manifest file
as well. As I have been told that, I should add UAC manifest to my
application, please can anybody tell me how to modify VSTO addin's
manifest file, so that I can use my addin as a "Invoker".

Thanks,
Dhananjay
Ads
  #2  
Old December 7th 07, 02:50 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Modify VSTO addin's manifest to work it as Invoker

See
http://msdn2.microsoft.com/en-us/lib...W indowsVista
in the deployment article for VSTO that I pointed you to. It has the
information needed for deployments on Vista.

--
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" wrote in message
...
Hi All,
I have developed one COM- addin in VSTO / VB 2005 / Office 2007. As we
know that, if we create a VSTO addin, then it is having manifest file
as well. As I have been told that, I should add UAC manifest to my
application, please can anybody tell me how to modify VSTO addin's
manifest file, so that I can use my addin as a "Invoker".

Thanks,
Dhananjay


  #3  
Old December 17th 07, 11:42 AM posted to microsoft.public.outlook.program_vba
Dhananjay
external usenet poster
 
Posts: 33
Default Modify VSTO addin's manifest to work it as Invoker

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,
  #4  
Old December 17th 07, 02:34 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Modify VSTO addin's manifest to work it as Invoker

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" wrote in message
...
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,


  #5  
Old December 18th 07, 05:51 AM posted to microsoft.public.outlook.program_vba
Dhananjay
external usenet poster
 
Posts: 33
Default Modify VSTO addin's manifest to work it as Invoker

Hi Ken!
I downloaded your project from the site you mentioned viz.
http://www.slovaktech.com/outlook_2007_templates.htm & the project zip
name is VSTO_VBNETAddin.zip.
After that when I opened your project, in FolderPP.Designer.Vb file I
can see very first 3 lines are -

Global.Microsoft.VisualBasic.CompilerServices.Des ignerGenerated() _
Partial Class FolderPP
Inherits System.Windows.Forms.Form

That means you are inheriting from System.Windows.Forms.Form & not
from UserControl.
I just changed that line to inherit from UserControl.
Any way, Thanks a billion for your valuable reply, which solves my
problem of property page.

Thanks again,
Dhananjay
  #6  
Old December 18th 07, 04:49 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Modify VSTO addin's manifest to work it as Invoker

Hmm, the copy of the project I have here (and that I wrote) inherits from
System.Windows.Forms.UserControl, not from Forms.Form.

It looks like VS did something when I exported the project as a project
template and changed my original inheritance from UserControl to Form.

--
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" wrote in message
...
Hi Ken!
I downloaded your project from the site you mentioned viz.
http://www.slovaktech.com/outlook_2007_templates.htm & the project zip
name is VSTO_VBNETAddin.zip.
After that when I opened your project, in FolderPP.Designer.Vb file I
can see very first 3 lines are -

Global.Microsoft.VisualBasic.CompilerServices.Des ignerGenerated() _
Partial Class FolderPP
Inherits System.Windows.Forms.Form

That means you are inheriting from System.Windows.Forms.Form & not
from UserControl.
I just changed that line to inherit from UserControl.
Any way, Thanks a billion for your valuable reply, which solves my
problem of property page.

Thanks again,
Dhananjay


  #7  
Old December 18th 07, 05:07 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Modify VSTO addin's manifest to work it as Invoker

I posted a fixed version of that template on my Web site. It looks like
somehow VS changed the inheritance in both the ToolsOptionsPP and FolderPP
designer classes from UserControl to Form inheritance. That wasn't done in
the C# projects or the shared addin project for VB.NET.

Anyway, the projects on my Web site are now correct.

--
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


"Ken Slovak - [MVP - Outlook]" wrote in message
...
Hmm, the copy of the project I have here (and that I wrote) inherits from
System.Windows.Forms.UserControl, not from Forms.Form.

It looks like VS did something when I exported the project as a project
template and changed my original inheritance from UserControl to Form.

--
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" wrote in message
...
Hi Ken!
I downloaded your project from the site you mentioned viz.
http://www.slovaktech.com/outlook_2007_templates.htm & the project zip
name is VSTO_VBNETAddin.zip.
After that when I opened your project, in FolderPP.Designer.Vb file I
can see very first 3 lines are -

Global.Microsoft.VisualBasic.CompilerServices.Des ignerGenerated() _
Partial Class FolderPP
Inherits System.Windows.Forms.Form

That means you are inheriting from System.Windows.Forms.Form & not
from UserControl.
I just changed that line to inherit from UserControl.
Any way, Thanks a billion for your valuable reply, which solves my
problem of property page.

Thanks again,
Dhananjay



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to run addin as a "Invoker" Dhananjay Outlook and VBA 1 November 1st 07 05:58 PM
Upgraded Outlook to 2007, now VSTO doesn't work HÃ¥kan Outlook and VBA 1 August 28th 07 02:19 PM
MSVCR80.dll error missing outlook.exe.manifest TravisG Outlook - Installation 2 June 6th 07 06:18 PM
Can no longer debug VSTO add-in jk Outlook and VBA 2 January 12th 07 07:13 AM
Unsubscribing from events (VSTO, C#) [email protected] Add-ins for Outlook 5 November 22nd 06 02:49 PM


All times are GMT +1. The time now is 11:38 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.