UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Problem Registering Dotnet Assembly, Win7/.net framework 4.8    
 
   
FrankRuperto
post Jan 24 2020, 11:21 PM
Post#1



Posts: 664
Joined: 21-September 14
From: (MilitaryBrat) Tampa Bay, Florida, USA


I ran the script as administrator and suddenly I am getting an error message saying I must run it as admin. This was working before. I checked script permissions, admin has full control and all the other perms. iconfused.gif
Attached File(s)
Attached File  AccessQBOdotnetTest.PNG ( 61.97K )Number of downloads: 11
 

--------------------
Currently supporting pawnbrokers that use my store management system developed with Access 2010 on Windows7. Experienced with Informix and Oracle DB's.
Go to the top of the page
 
PhilS
post Jan 25 2020, 03:23 AM
Post#2



Posts: 680
Joined: 26-May 15
From: The middle of Germany


QUOTE
I ran the script as administrator and suddenly I am getting an error message saying I must run it as admin.

I doesn't look like your script is running as administrator to me. The window title should be "Administrator: ..." if it is running with admin permissions.

--------------------
A professional Access developer tool: Find and Replace for Access and VBA
Go to the top of the page
 
FrankRuperto
post Jan 25 2020, 06:53 AM
Post#3



Posts: 664
Joined: 21-September 14
From: (MilitaryBrat) Tampa Bay, Florida, USA


Isin't running with elevated admin priviliges the same as running as admin? The user acct I am logged in as is an admin acct.

I tried running it both ways and no luck.

In the first image, I get the UAC popup and I answered yes, in second image I ran it in the cmd shell as admin. Attached are the dll's and the script.
This post has been edited by FrankRuperto: Jan 25 2020, 07:00 AM
Attached File(s)
Attached File  RunAsAdmin.PNG ( 210.88K )Number of downloads: 9
Attached File  RunAsAdmin2.PNG ( 50.41K )Number of downloads: 15
Attached File  QBOAccess.zip ( 1.07MB )Number of downloads: 2
 

--------------------
Currently supporting pawnbrokers that use my store management system developed with Access 2010 on Windows7. Experienced with Informix and Oracle DB's.
Go to the top of the page
 
FrankRuperto
post Jan 25 2020, 09:52 AM
Post#4



Posts: 664
Joined: 21-September 14
From: (MilitaryBrat) Tampa Bay, Florida, USA


UPDATE: I ran the script on another Win7 box that has not had any updates installed in more than one year and was able to complete everything, as you can see in the image, so an update must have changed something for the script to suddenly not work on this other Win7 box. I need to get this proof_of_concept working for a large accounting firm that wants to integrate thier Access client write-up app with QuckBooksOnline.


Attached File(s)
Attached File  QBOref.PNG ( 30.97K )Number of downloads: 9
 

--------------------
Currently supporting pawnbrokers that use my store management system developed with Access 2010 on Windows7. Experienced with Informix and Oracle DB's.
Go to the top of the page
 
PhilS
post Jan 26 2020, 07:34 AM
Post#5



Posts: 680
Joined: 26-May 15
From: The middle of Germany


QUOTE
Isin't running with elevated admin priviliges the same as running as admin? The user acct I am logged in as is an admin acct.

Just logging into Windows with an administrator-account will still not run programs with full permission of UAC is enabled. - So, there might be a difference.
But now the title bar in your screenshot looks as expected, re admin permissions.

I've got no idea what is causing the problem.

--------------------
A professional Access developer tool: Find and Replace for Access and VBA
Go to the top of the page
 
AlbertKallal
post Jan 27 2020, 02:17 PM
Post#6


UtterAccess VIP
Posts: 2,955
Joined: 12-April 07
From: Edmonton, Alberta Canada


tap windows key, type in cmd.exe.

From the list - right click on cmd.exe, and choose run as administrator.

That should get you a cmd.exe running with admin rights.

In fact I often do the same with access. (right click on a desktop shortcut - run as admin. You often have to do this to get access to run as adim if you creating or setting up a ODBC data source (if you run access as admin, then when access launches the ODBC manager it also runs as admin). This is often the case since a "user" or "system" DSN stores it values in the registry. - again locked down corporate environments will often bite you - so you have to run as admin).

As a FYI?

I don’t register my .net .dll’s anymore!

The reason of course is deployment issues. I am finding an “ever” increasing number of companies that hire outside IT firms to manage their computers. And the result is VERY painful issues arising when it comes time to install simple things. (You often wind up calling the IT Company to get elevated rights to install or register some silly “tiny” thing, and it really is a painful process.


As a result, I now use what is called “side loading” of .net. What this means is I ONLY deploy the .net .dll in the same folder as the front end, and then side load.

There are several published examples on how to do this, and the end result is you eliminate the need to “register” your .net bits and parts – a simple placement of the .net dll in a folder is all that is required. (you don’t even have the resulting tlb file after a regasm). So all that you do is "copy" the .dll to the target computer - no elevated rights required.

So, you just place the .dll in the same folder as the front end. And those .net dll’s tend to be VERY small.

Currently, I am/have been using this example here:

http://www.everythingaccess.com/vbDotNetLoader

Now, it turns out the above link is gone, and in their downloads section, they don’t have the sample anymore. (so, in all fairness I can’t post their code + example here until I ask for permission). I could/should ask for permission to post their solution (it is very slick).

Barring the above, I could post a working “loadnet.dll” that does the above. It would/should be VERY easy to create such a loader, and again this loader would not require registration. I HIGH recommend this approach. And my interfaces to QuickBooks and Sage accounting systems now use this approach, and I don't have to register my .net bits and parts I use for access to quickbooks (desktop version in my case).

Regards,
Albert D. Kallal (Access MVP 2003-2017)
Edmonton, Alberta Canada


Go to the top of the page
 
FrankRuperto
post Jan 27 2020, 02:58 PM
Post#7



Posts: 664
Joined: 21-September 14
From: (MilitaryBrat) Tampa Bay, Florida, USA


Hi Albert,

QUOTE
That should get you a cmd.exe running with admin rights.

I tried all the different ways to run cmd shell as admin, but didn't work on this one particular Win7box, but works on other boxes so dont know what's causing issue iconfused.gif

I searched older snapshots of everythingaccess in wayback and could not find the vbDotNetLoader example, but found this WinSxS-related post in SO:
https://stackoverflow.com/questions/1903220...c-sharp-and-vba

As I mentioned in previous posts, the Access FE master copy is stored in the same folder where all the dll ,xml and other needed files are located, so probably best for me to sideload versus register, however if IT's are managing users networks, then IT probably interprets dll sideloading as potential malware and blocks it?
This post has been edited by FrankRuperto: Jan 27 2020, 03:04 PM

--------------------
Currently supporting pawnbrokers that use my store management system developed with Access 2010 on Windows7. Experienced with Informix and Oracle DB's.
Go to the top of the page
 
AlbertKallal
post Jan 27 2020, 08:38 PM
Post#8


UtterAccess VIP
Posts: 2,955
Joined: 12-April 07
From: Edmonton, Alberta Canada


QUOTE
however if IT's are managing users networks, then IT probably interprets dll sideloading as potential malware and blocks it?


Neven been an issue for me. I mean, if a user has to run some .exe, and it uses a few .dll's, then such software has to run. The security tends to kick in when registering such objects, since that tends to require elevated registry rights.

Now, in some cases, some virus protection software can "slow" down such software, but it tends to do the SAME if you consuming a registered .dll anyway.

In other words - it tends to be the installing side of things that is the challenge you have to get around. I for example am running a 18 year old version of paint sho pro on my PC. I been using it since 2000 - I am just so used to this picture editor, then I still use it! So, for pasting say a screen cap here on UA etc., then I tend to use paint shop pro. I notice on win10 it has "quite" a delay on startup - my spider sense suggests this is some of the dll's etc. being looked at, or messed with. Such a very old program no doubt did not add extra security settings during the install - so it loads with a delay, but once loaded, it works fine.

However, I find that a simple .dll sitting in a folder tends to be "left" alone, and is no worse then say opening a accDE file - if the virus software does not interfere with using the accDE, then side-loading .dll's works without issues and delays. I not experienced any kind of delay or issue as a result.

I don't know if I should ask the author for permission to post, or simply make a .dll that does the same thing anyway?

R
Albert


Go to the top of the page
 
FrankRuperto
post Jan 27 2020, 09:13 PM
Post#9



Posts: 664
Joined: 21-September 14
From: (MilitaryBrat) Tampa Bay, Florida, USA


QUOTE
I notice on win10 it has "quite" a delay on startup - my spider sense suggests this is some of the dll's etc. being looked at, or messed with.


Everything in Win10 takes longer sleeping.gif Having legacy 16-bit DLL's for Corel PSP in the WinSxS folder causes a big loading delay because it has to run in a single memory space. I'm actually surprised your PSP hasn't crashed. WinSxS is essentially a database of all installed shared libraries of windows applications. If you install 5 different versions of a program, or re-install the same version 5 times, SxS is has to evaluate which libraries to share, then decide which application to launch. The DLL's, registries and apps can quickly get out of sync. A WinSxS folder can grow out of control consuming many GB's, thus the famous DLL Inferno, (UA doesn't allow the word H_LL?).

I wish MS would have cleaned up the DLL and registry issues with Windows. Linux uses a much cleaner design with the RPM package manager. RPM opens the archive and installs the files to the location the package specifies. The package manager remains aware of which files belong to which packages, and when you uninstall a package, the package manager knows exactly which files on the system belong to it. Windows has no idea which files belong to an installed application, it lets application installers manage installation and uninstallation themselves.

Since I already have everything my Access FE/Dotnet interop needs all in one folder, if you can share the DotNetLoader code, then I can implement sideloading versus registering the QBO dll.
One less thing to worry about for me and users under the watchful IT eyes cheers.gif
This post has been edited by FrankRuperto: Jan 27 2020, 10:12 PM

--------------------
Currently supporting pawnbrokers that use my store management system developed with Access 2010 on Windows7. Experienced with Informix and Oracle DB's.
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    28th February 2020 - 11:18 PM