I have created a Excel Add in Application and i have built an .VSTO file out of it.
Now whether i need to create installer for installing it or is there is any we can create .exe file (without installer).
I don't want the installer option as some of the user's will not be having admin access.
So can we create .exe file out of VSTO Excel Add in.
Thanks,
Karthik
If I have understood properly below is the answer....
When do you publish Addin project using right click on project, you can see the *.VSTO file get created on provided path.
That *.vsto file is itself a installer.
In order to "install" an add-in, you require registry entries similar to ours shown below
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\Word\Addins\Chem4Word]
"Description"="Chem4Word"
"FriendlyName"="Chem4Word"
"Manifest"="file:///C:/Dev/Chem4Word/WordAddIn/WordAddIn/bin/Debug/WordAddIn.vsto|vstolocal"
"LoadBehavior"=dword:00000003
Simply change the Manifest location is the location where your .vsto and .dll files are.
Also as this example is for our Word Add-in "Word" also needs to be changed to "Excel" where appropriate.
Related
I have an excel plugin where I want to read an xml file on form load from a config folder, but I can't figure out how to read from that folder after I deploy the application.
On the excel ribbon, when the user clicks a button to open my plugin, on form load, I want to read from a specified directory. I am deploying the application with ClickOnce and using VS 2017. I set the xml file build to Content and set Copy to output directory as Always. When I deploy, it puts the xml file in some ClickOnce dll folder when the user installs it.
Try InstallDir = Environment.CurrentDirectory; at startup of you plugin.
In ThisAddIn_Startup or in your ribbon constructor.
When I create .msi file for C# windows application, the file <myexename>.exe.config automatically comes in the installation path after installing the .msi setup file.
How to exclude .exe.config file?
I think it is to be done during the Set up creation process itself.
Please advice.
<myexename>.exe.config is a config file (App.config) of your application.
when you create installer for any windows application, it will autometically include it.
it is necessary, for example you stored your application database connection string in that or may be other settings also
so when you execute your application then your application myexename will look into <myexename>.exe.config for some settings as well for some necessary data required.
still, if you want to exclude it, perform the following steps:
1)Right click on installer project -> View -> File System
2)In Application Folder, Right Click on Primary Output of your application and select Properties Window
3)In Properties, Select Exclude Files
4)Click on Add Filter
5)Enter app.config in text and press ok
now rebuild your project and install the .msi
<myexename>.exe.config will be removed from your installation directory
Everything in Visual Studio seems to lead one to putting data files with the application.The app.config goes there, when I create an .XML data file, there is a Copy to Output property that will automatically copy that file to the exe folder. Howerver, it seems that under Vista and Win7 UAC doesn't want the application to be able to write data to any file in the application directory. So I'm changing my evil ways so that I use the LocalApplicationData folder for files I want to read and write. (I just read the app.config so I'm leaving it alone)
I'm using a VS2010 Visual Studio Installer project to create the installer for this app and I can't seem to find a way to target the folder for my .xml file to the LocalApplicationData folder. I can click on the file and see a Folder property but the dialog only has options for Application Folder, User's Desktop and User's Program Menu. Is there some way to do this in the installer or do I have to write code that checks for the file and copies it over from the .exe folder when it doesn't exist? I figure I'm late to this particular party and there must be a canonical way of handling this.
Also, I'm wondering about debugging, is there something similar to the copy if newer functionality in the build process that will now copy this .xml file automatically over to the LocalApplicationData folder whenever I update it?
The Setup project doesn't expose LocalApplicationData in the Special Folders list. You can use it anyway by doing this:
Add a Custom Folder and set the DefaultLocation property to [LocalAppDataFolder]
I want to make an installer tracker.
If a execute file is a installer program, I will start a process to record the setup process. So I get a setup log after installing.
But How can I recognize an installer file. All installer files have ".exe" extenison. Is there a special metadata in the execute file to tell me it's a installer file.
I know word files have "author", "title" metadata. Maybe a installer file has a "install program" metadata. Anyone help me?
No; an installer is just an executable file (or a script, in case of MSI).
However, you can recognize it by what it does - take a snapshot of the system as it was before, perhaps hook the file and registry operations of the executable, and when it finishes, look at what it has changed.
For example, has it created a folder in Program Files? Has it created an uninstaller entry in the registry? Has it created any services? Etc.
When and MSI is installer/removed/repaired an "msiexec.exe" process will be started by the OS. So this could be another resource that you would want to watch.
As for the file/registry system you could use the OS monitoring API that listen to changes and gives you the desired information.
http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx
I am using VS2008 setup project to build our msi installer. I have moved some dll files from the default location (root folder of the installation) to a custom bin directory. I think I need to set path in somewhere (registry?) to tell the application the new loation of those dll files. How to do this? thanks,
Just open up the .vdproj file in notepad and search for the dll files you moved. Then adjust the dll path (usually called SourcePath). You should not edit anything in the Registry! Only edit this file.
If these are references in your project, I would remove the references and add them back using the Browse tab of the Add Reference dialog.