ExcelDna location causing issue in Win 11

101 views
Skip to first unread message

Krishna Kumar

unread,
Feb 12, 2025, 10:13:14 AM2/12/25
to Excel-DNA
Hi Govert, I hope you are doing good. I am seeing issues with our Windows Security blocking the location used by ExcelDna causing whole addin to fail to load. 

On Windows 10, location was C:\Users\*\AppData\Local\Temp\1\ExcelDna.Host\*\ExcelDna.ManagedHost.dll
But on Windows 11 it's
C:\Users\*\AppData\Local\Temp\ExcelDna.Host\*\ExcelDna.ManagedHost.dll
 
Is it possible to change the location to same as Windows 10 or may be make it configurable?

Govert van Drimmelen

unread,
Feb 12, 2025, 10:22:48 AM2/12/25
to exce...@googlegroups.com

Hi Krishna,

 

We use the “GetTempPath” Windows API call to get the right temp directory to use.


I think when Excel is running ‘As Administrator’ we might get the extra “Temp\1” directory from this call.
I’m not sure whether this changed in Windows 11, or whether you are now no longer running Excel ‘As Administrator’.

 

I think you can override the temp directory that GetTempPath() will return by setting the TMP or TEMP environment variables.

But I don’t know how that interacts with the elevated ‘As Administrator’ story.

 

-Govert

--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/exceldna/f9c51743-f8da-4117-91be-c7bc739c4f12n%40googlegroups.com.

Message has been deleted

Krishna Kumar

unread,
Feb 13, 2025, 10:16:51 PM2/13/25
to Excel-DNA
Thanks for responding so promptly. Let me try your TMP env variable suggestion and come back. 

Krishna Kumar

unread,
Feb 17, 2025, 10:54:25 AM2/17/25
to Excel-DNA
Hi Govert, I changed the TMP location to a different one and it started working. Thanks for your help!
Reply all
Reply to author
Forward
0 new messages