Not able to register a third party DLL even with elevated rights - regsvr32

I have been trying to register a
third party dll file using the regsvr32 command, but it keeps giving me the error
"The module "test.dll" was loaded but the call to DLLRegisterServer failed with error code 0x80004005."
I am running it with elevated commands in CMD but still same issues.
Has some one faced similar issues and knows a possible solution for it.
Thanks

Related

How to Determine Which Dll Dependency is Failing to Load in Windows Store/Universal Apps?

When running a UWP project I'm working on I receive the following dialog.
"Unable to activate Windows Store app 'MyAppsMangledName'. The 'MyExeName' process started, but the activation request failed with error 'The App didn't start'."
The Visual Studio output has the following.
The thread 0x3d4c has exited with code -1073741515 (0xc0000135).
The thread 0x3b50 has exited with code -1073741515 (0xc0000135).
The program 'MyExeName' has exited with code -1073741515 (0xc0000135) 'A dependent dll was not found'.
The Event Viewer has 3 events that basically restate the popup dialog in 3 different ways and nothing else.
Running Process Monitor during the startup shows me many dlls being successfully loaded but nothing indicating failure besides some NAMENOTFOUND events which unfortunately don't show what name wasn't found.
In Win32 a helpful dialog usually indicates which dll could not be loaded. And of course with .Net apps the fusion logs make tracing this very straight forward. But for Store/UWP apps I can't seem to find a good way to track down the offending dependency.
This just hit me too on a project I'm working on. And after much digging, someone on my team was able to figure it out. So figured I'd share it for others struggling with the same issue.
We're doing UWP with C++ using VS2015. So with that in mind, there is a program called gflags located for me at C:\program Files (x86)\Windows Kits 10\Debuggers\x64\gflags.exe
So you'll want a cmd window with admin, and run the command gflags.exe -i your-program-name.exe +sls
Note: gflags wasn't in my path so either add the path or navigate to where it is before executing the command.
Just pass in the name of the exe without directories. What it does is sets a registry setting for VS that turns on sls (show loader snaps) for exe's matching that name. Then run your application in VS and and you'll get a large amount of dll loading information including names of the dlls that fail to load in your output window. In our case it was this:
5038:34f4 # 789320468 - LdrpProcessWork - ERROR: Unable to load DLL: "vccorlib140d_app.DLL", Parent Module: "E:\projects---\Source\Builds\vs2015_Debug_UWP_x64\AppX---.exe", Status: 0xc0000135
Another quicker alternative way to test this (YMMV) was to compare the output with another build config that does work. In our case, we can run release builds just fine, but debug builds barf. And the release output showed vccorlib140_app.dll loaded while the debug had it missing.

issue appears only in generated app.exe and dont appear in the sources' execution | PowerBuilder

I have an issue when i execute my app.exe, there is an error which is revealed only in the ".exe", if i try todo the same thing when i use the sources, there is no problem, i think the problem is when there is a call of the update method from a datastore, it return -1 with generated .exe and 0 when i execute sources.
i have tried to refresh any library from my app, before building, but the issue remains, for information the app is using a DB2 DATABASE, and it is built and run in a windows7 environment.
The likely cause is that when you built the exe, the DataWindow object assigned to the DataStore wasn't included. You need to use a .pbr file in the Project object. Look in the help file under 'deploying your application'.
I have encountered this problem as well when I deployed strictly to a *.exe file. The problem went away when I deployed to a *.exe with a *.pbd. This is established on the "libraries" tab of your project by checking the pbd checkbox.
An 'exe' only deployment can't handle hard coded 'literal strings' in your code. Creating and deploying 'pbd' library will allow 'literal strings'.

TFS2012 Access to VSPROPS file denied

So I am trying to run a build on VS2012 paired with TFS2012. I have made some modifications to the build template being used, but none that should be troublesome. My problem comes around when I try to execute the build, the build summary gives me the following error:
Exception Message: Access to the path 'C:\AiDevelopment\AiFramework\toolbox\Accelitec.Utility\Accelitec.Utility.csproj.vsprops' is denied. (type UnauthorizedAccessException)
Now normally I would take this as a permissions issue, however I go to try and find this contentious little file, and it doesn't exist! (At least not in the path specified). Sooooo... what is going on? How can my build report that it is denied access to a file that isn't there? How can I fix it?
Update: I have found the file, it is on the build server. This server has VS2008 installed on it for other uses, which makes me think that VS2008 is interfering with the build somehow, seeing as .vsprops files are used only in VS2008 and older. Why would my VS2012 builds be creating a .vsprops file?

Cannot debug Sharepoint application using non system account user?

I am using WSPBuilder to develop Sharepoint2007 sites, whenever i try to debug using one of the users that are not System Account, the debugger enters to the breakpoint and waits a step (F10), when i press F10, i get the following exception in the debug output window after pressing F10 on the line having the breakpoint:
A first chance exception of type 'System.Threading.ThreadAbortException'
occurred in XXX.dll
An exception of type 'System.Threading.ThreadAbortException'occurred in XXX.dll
but was not handled in user code The thread '<No Name>' (0xfc4) has exited with
code 0 (0x0).
and i am redirected to a page of sharepoint saying:
Go back to site
Error: Access Denied
Current User
You are currently signed in as: SHAREPOINT\ZZZ
Sign in as a different user
When i try to RUN not to DEBUG with the same user, I don't have this problem.
Also when i try to debug using the System Account (MOSS ADMIN), I don't have this problem ?
How to overcome this problem ?
BTW, i am trying to debug a custom ASPX/CS page installed as a feature on the site.
FYI, it's only for this project not for all projects i have, also it's for all pages in this project not only one page.
For those who are interested, I found the solution:
I created a new project and copied my files to it (of course with recreating features), now it works fine. That means that the project itself is the problem not the IDE, perhaps some of its file are corrupted !
You might want to try and add the user SharePoint\zzz to the WSS_WPG and WSS_Admin groups to see if that gets you around the issue. I assume you are doing the debugging on a single, stand alone install so you could also try and make SharePoint\zzz and administrator.

Windows XP Pro Service runs using User logon, not using Local System

I wrote a Windows Service using VS 2005 and C# on WinXP Pro SP3. It starts another program which runs to completion and then exits.
The service is installed using installutil and serviceInstaller. It is built release and put into the C:\Program Files\MyService directory. The serviceProcessInstaller Account is set to LocalSystem in it's Properties.
If I set the Log On to Local system I get an 'Access Denied' error (using a try-catch block), but if I set the Log On to my account with the correct password, it runs perfectly.
What am I doing wrong? Any suggestions will be very welcome.
It will be useful to know where the access denied error comes from. Since you say it is from a try/catch block, I assume it is your code that handles it. That would mean that your service is starting just fine, but has problems doing its job.
It could be environment related problem, since the environment for LocalSystem is different than your user account. Also, it could be that the program it starts is not executing properly and it is returning the error.
Without more info, it is just speculation. What is that other program doing? Where is the error occurring? Why don't you debug it and find which part returns the access denied error?
Agreed, it should be on SO. That aside, check your file/folder permission sand ensure System does in fact have the necessary rights. Do the same for the registry keys. The System event log should give you some clues.
Both answers: thanks for the help.
The error orrurs at the Process.Start() call.
The file and directory security shows Everyone has full access to the directories and the executable.
FOUND IT! I had added a user name and password to the ProcessStartInfo object, thinking that it would be useful when the target program tries to get to the database. Oops! When I took that stuff out, the target runs jult like it should.
Thanks again to all who replied. Mea Culpa!

Resources