Can you auto-run a custom functions add-in, or dynamically run it from a different add-in (same domain)? - excel-addins

TL;DR - By default, a custom functions add-in registered with Excel is available, but not running, when Excel loads. It only gets run if one of its custom functions is used (or if it has a task pane and the user opens it). Is there any way to auto-run it or trigger running it from a different add-in (in the same domain) that is running?
Details:
We have multiple custom functions add-ins: a "main" one everyone has and a few other optional ones providing sets of functions appropriate to different job roles, controlled by Active Directory membership. They use the shared runtime. Each add-in has a task pane (though the users rarely open them).
Sometimes, code in a custom function in one of the non-"main" add-ins needs to show a warning message to the user (not as its return value). Since they have task panes, we could have functions in each add-in show warnings by showing their task pane (showAsTaskpane) and putting the messages there. But there are cross-cutting warnings we would prefer to only show in the "main" add-in's task pane rather than having them show up willy-nilly here and there. That's not a problem when the "main" add-in is loaded in memory and running; we can use a BroadcastChannel to send messages to it. But if it happens that none of the functions in that "main" add-in have been used (yet) and the user hasn't opened its task pane, that add-in isn't loaded/running, so we can't send messages to it.
Is there any way to get that add-in running in that situation? Whether by auto-running it on load (I don't see anything in the manifest reference for that), or by having the custom function in the other add-in dynamically tell Excel to run the "main" add-in?

For your question: "Is there any way to auto-run it or trigger running it from a different add-in (in the same domain) that is running?"
I think the answer is no.
Not sure whether helpful, I'd like to provide you with a doc link of auto-open feature. After setting your add-in auto-open, your add-in task pane can open automatically if the add-in is already installed on the user's device.

Related

Automate log conversion as Action in Vector CANoe

CANoe offers an option Actions in the Export and Logging Settings window. The help window says:
An action defines an application that is called after saving the
target file.
What I'd like to achieve is something similar to this question: have all the logs from the application happen in BLF format using a single logging block (for performance reasons, I don't want to put a lot of logging blocks in the simulation), then set up an action to automatically convert the BLF file to ASC. Yes, I could write an helper program opening CANoe via COM, but I'd like not to. Somebody from Vector told me once that the only portion of CANoe certified for ISO26262 is the CLI, but it doesn't sound right to me.
I can't even get started on this, as I cannot find any documentation about using CANoe via CLI. Does anybody knows how to do this (if it can be done)?
EDIT: in the CANoe RT Server: Command Line Control portion of the help manual, it says (emphasys mine):
Configuration and control of the CANoe RT server is mainly done via
the CANoe dialog on the user PC in Options dialog (Extensions|CANoe
RT). In addition you can also control Runtime Server and Runtime
Kernel via command line input on the server host.
so they have CLI for something. I'm afraid the answer might be that is not feasible because Vector wants to enforce COM interface as the only interface for automation pipelines (see also Jenkins integration)
The question which you are referring to uses COM interface for performing the conversion.
A suggestion for you is to create an application which open a new CANoe window and then make the conversion and close immediately(similar to the one in the question you referred).
Then, you can start the application via the Actions feature.
NOTE: There are no CLIs to control the CANoe application.

LibreOffice macro user instruction

I have a LibreOffice Calc document which needs to be downloaded by remote users. It uses macros - so they need to have macros enabled for it to work at all and there is no control over user machines.
To help with this I have a text message on the first tab telling them they need to enable macros and some instructions how. On document open I run a macro to remove this message - as long as they have macros enabled they never see it and all is well.
This solution works but is not perfect because:
It will trigger the save changes dialogue even if they did no changes.
It leaves the message removed if they save and pass the document directly to another user.
Just doesn't feel like a well-engineered solution
Is there a better way to accomplish showing this message only when macros are not enabled?

Start an application at system start without login

We have a new server running and we got some new programs doing import routines. So far so good... But there is one program that is put into autostart folder. So it doesn't run until admin logs in and it stops if we logout.
I'd like to put this one into a seperate session so it may work without any interaction by simply starting it with the task scheduler at startup. Is this the right way to do this? Is it safe if I log in later and log out?
Many thanks!
Edit: The applications shows as a symbol in the task bar if running, it can be configured by this. Anything I must know about this if I change?
Edit: It is not my application, I cannot rewrite it as a service.
I successfully added the application by using task schelduler on startup. Login and logout will not quit the application but no symbol is shown. Please add details to my side questions and I'll mark your answer as the accepted one.
Edit: Ended up using this one. If I have to configure, I stop the application in task manager and start it again by link. After that I quit the application and restart it by task scheduler manual start.
You need to run your program as a Windows Service. One way of doing it is using the sc.exe program:
> sc create <new_service_name> binPath= "c:\myapp\myapp.exe"
You can read about it here.
You need to separate your application in two.
To allow it to run without a user session, you need a windows service. That should handle all the background stuff. You can then register the service and set it to start when the system starts.
To allow it to have a UI, and show up in the notification area, you need a windows application. This will be in autostart as usual, and will communicate with the service - for example, over named pipes.
While it is still (barely) possible to run an UI application without a user session, it's only maintained for backwards compatibility, and already shows a lot of problems. It will likely be removed altogether in the future, because it breaks quite a few contracts. Do not rely on hacks like this.
I also used the task scheduler to create the application at system startup. It should be noted that if you want to use for mining, you have to disable an option in "settings" where it says that if the application lasts more than three days in a row it will end.
It really works wonderfully!
it is a old question but I recently solved in another way...
(before I was using a scheduled-task for startup but this gave me diverse problems with lots software...)
Some programs also for diverse reasons must be run at a user level... or even inside a specific user session...
So the best way I found was to use a tool like Sysinternal/Autoruns to program the auto-logon to a specific user (it is a registry setting)... and in the startup-folder of that user (or any other "autorun/autolaunch" task)... run a script that first locks the screen... and next runs the other intended programs... that will run under that user profile...
so you can choose a standard user or a administrator... or even launch programs from a standard user in adminsitrator mode...
I hope will help...
This "hack" solved me many problems with startup apps...
I could not get the "sc create" command to work. Instead I manually edited the registry using regedit. I added a new key in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services.
I used the following page to figure out required parameters and their values. Note that the names do not map.
https://learn.microsoft.com/en-us/windows-hardware/drivers/install/inf-addservice-directive
Old question, but for anyone that stumbles here. Use srvany to set the program as a custom service.
Note that when you do this with for example dropbox, googledrive, etc., you will need stop the service, then open the program normally to make changes like password, updates, etc.
below is a well enough intro.
https://www.iceflatline.com/2015/12/run-a-windows-application-as-a-service-with-srvany/
Download the tool kit here
https://www.microsoft.com/en-us/download/details.aspx?id=17657
Convert user application to Service and Register it using Regsvr32 or installutil.exe. It will start the service using SYSTEM user account. Which is a high privilege account.
Note : You can`t run any Window based application. Even a Message only window.

Eclipse debugger for GEF editor

I have a GEF editor which represent a finite state machine. Editor's input (and output) is XML. What I am looking for is a way to debug my editor visually.
The way editor works is you create a state Start->Email->End, XML that is created is send to the server and there magic happens, of course Email object has properties that you set: from email, to email, subject, etc. What I am looking for is a way I can launch a debugger and step through each step of execution. So for example if I break at Email step I would be able to see what message was, whom it was for and what server returned at the end.
Is this something that is possible to accomplish and if so are there any articles I need to read to familiarize myself with how to create this debugger?
I found some discussion about Eclipse debuggers (1,2) but nothing about what I am interested in doing.
There are two different issues here.
One is writing a debugger engine, that manages the execution of your model, for example steps the execution, allows querying the variables/states, etc., and another one that outputs the result in your editor.
The articles you have linked work with the first issue: creating an engine that executes the model in the background, and integrates the engine into the Eclipse environment using 1) the launch framework to execute it similarly as Java programs, and 2) allows displaying the state in the textual editors.
You want to display the state in graphical editors. Because graphical editors have much less in common, the back-annotation of the debug state has to be done manually (instead of the generic support for text editors). Basically, I would create actions that set up breakpoints, and update the model to be able to store/query the execution state, and then update the GEF views to display it on the GUI. For this you have to change your Figures and your EditParts at least, and possibly other places as well.

How to get rid of VBA feature prompt that appears every time MS Word loads?

I created a Word add-in that contains ribbon tab and some code to work with SharePoint sites. All working code including ribbon definition I placed in separate library that is shared between Word, Excel and PowerPoint add-ins.
For testing my solution I use trial versions of Windows Server 2008 R2 and Office Home and Business 2010. My Word add-in installs and works fine, but every time I open Word, I see the following notification: "The function you are attempting to run contains macros or content that requires macro language support." I need to press OK button three times for my add-in to load.
Is it possible to hide that notifications without having to install "Visual Basic for Applications" feature for MS Office?
There is no such problem in Excel or PowerPoint.
I suggest you check your security level for macros. The setting is different for each office application. On the lowest setting, no prompts will be shown.
Update:
You might also want to check this out:
http://www.geekstogo.com/forum/topic/168555-word-2007-continuous-macro-errors/