Notifications
Clear all

[Closed] Cannot install new version automatically

Page 1 / 2
batFix
(@batfix)
Reputable Member

Win 10 Home, the account has Admin Rights.

nlba err2

It's same error what was with 3.4.0, what I did install manually after download new version of NLBA software:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

*********** Exception Text ***********
System.UnauthorizedAccessException: Access to the path 'C:\Program Files (x86)\NLBA Laptop Battery Analyzer\NLBA_LaptopBatteryAnalyzerUpdate.exe' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.File.InternalWriteAllBytes(String path, Byte[] bytes, Boolean checkHost)
at System.IO.File.WriteAllBytes(String path, Byte[] bytes)
at ‬‍‬‭‫‌‫‏‪‌‪‫‫‍‫‏‏‬‫‌‬‮‎‎‌‬‮.‫‪‌‎‬‪​‍‭‏‪​‬‏​‭‍‪‍‬‮[T0,T1,T2,T3](T3[*] )
at ;Q|"U0Fb_\&iEXl\*##|<T\\V3V\&.‬​‮‎‍‬‬​‫‏‮‌​‪‪‫‫‍‭​‭‬‬‮‌‭‪‮[T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20](T7 , T10 )
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


*********** Loaded Assemblies ********
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4200.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
NLBA_LaptopBatteryAnalyzer
Assembly Version: 3.3.0.0
Win32 Version: 3.3.0.0
CodeBase: file:///C:/Program%20Files%20(x86)/NLBA%20Laptop%20Battery%20Analyzer/NLBA_LaptopBatteryAnalyzer.exe
----------------------------------------
qFpeEwioWELEWHArgRAxlNFEVKHF
Assembly Version: 0.0.0.0
Win32 Version: 3.3.0.0
CodeBase: file:///C:/Program%20Files%20(x86)/NLBA%20Laptop%20Battery%20Analyzer/NLBA_LaptopBatteryAnalyzer.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4200.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4200.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
PdfSharp
Assembly Version: 1.50.4740.0
Win32 Version: 1.50.4740.0
CodeBase: file:///C:/Program%20Files%20(x86)/NLBA%20Laptop%20Battery%20Analyzer/PdfSharp.DLL
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4190.0 built by: NET48REL1LAST_B
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4200.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Management
Assembly Version: 4.0.0.0
Win32 Version: 4.8.3752.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Management/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Management.dll
----------------------------------------

******** JIT Debugging ***********
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Lets Make NLBA Great ! Together.

Topic starter Posted : 21/09/2021 6:26 am
batFix
(@batfix)
Reputable Member

I'm usually set try & catch exception for that and pull the error description to understand the issue

System.IO.FileStream

Lets Make NLBA Great ! Together.

Topic starter Posted : 21/09/2021 6:30 am
batFix
(@batfix)
Reputable Member

V 3.5.1 manually downloaded and installed successfully from same account and the session.

Lets Make NLBA Great ! Together.

Topic starter Posted : 21/09/2021 7:00 am
Nicusor
(@azzido)
Member Admin

@batfix 

Your issue is strictly connected to the rights, paths, etc. There is a clear message to make sure the program has the right access and run it in administrator mode. The exception says the same thing, UnauthorizedAccessError, is this not clear ?

NLBA Laptop Battery Analyzer with Chip Reset & Repair Option

Posted : 24/09/2021 10:01 am
batFix
(@batfix)
Reputable Member

Sure, I see no reason for that. 

Simple q - why I cannot update automatically (see first post here) last versions, while running install from manually downloaded file works fine.

Noting changed, exclude: failed attempt did run from previous version and made success when no old version is running.

I think there is a conflict between running version and update.

Lets Make NLBA Great ! Together.

Topic starter Posted : 24/09/2021 10:36 am
Nicusor
(@azzido)
Member Admin

@batfix 

I have already answered. The application does not have the rights needed to write at that location, it is very simple.

NLBA Laptop Battery Analyzer with Chip Reset & Repair Option

Posted : 24/09/2021 1:06 pm
batFix
(@batfix)
Reputable Member
Posted by: @azzido

The application

It's very ambiguous - what app ?

We have three here:

  1. one is prev version of NLBA SW,
  2. second - the updater what was run from the prev SW [autoupdate ?];
  3. third- an EXE - downloaded as ZIP from the site manually.

Lets Make NLBA Great ! Together.

Topic starter Posted : 24/09/2021 5:08 pm
Nicusor
(@azzido)
Member Admin

@batfix 

If you read your first post you will find the answer.

NLBA Laptop Battery Analyzer with Chip Reset & Repair Option

Posted : 24/09/2021 5:59 pm
batFix
(@batfix)
Reputable Member

OK, let me dial down:

it's a program with name have an issue with access, what should be debugged and fixed:

NLBA_LaptopBatteryAnalyzerUpdate.exe

Lets Make NLBA Great ! Together.

Topic starter Posted : 24/09/2021 6:24 pm
Nicusor
(@azzido)
Member Admin
Posted by: @batfix

OK, let me dial down:

it's a program with name have an issue with access, what should be debugged and fixed:

NLBA_LaptopBatteryAnalyzerUpdate.exe

You still did not get it. The application itself cannot control the access rights of the operating system. The main issue is on your side, how you configured the user access and not the application. If you don't know how to configure windows for access rights don't use the automatic update, use the manual update.

NLBA Laptop Battery Analyzer with Chip Reset & Repair Option

Posted : 24/09/2021 9:27 pm
batFix
(@batfix)
Reputable Member

I know how to set such parameters . You still don't into the issue - my account has Admin rights.

Your two different programs: Updater and full installer (from ZIP) requesting DIFFERENT access to

C:\Program Files (x86)

and the Updater opening the path incorrectly - check and compare your own source code.

 

Adding to that - you can use some Win API calls to obtain access to Win directory like "Program Files(x86)" from your Updater in correct manner.

Lets Make NLBA Great ! Together.

Topic starter Posted : 25/09/2021 6:01 am
torture
(@torture)
Member Moderator

Right click on NLBA desktop shortcut.

Compatibility Tab

Tick Run This Probgram As Administrator Box

Problem Solved.

Untitled

 

Posted : 25/09/2021 3:45 pm
batFix
(@batfix)
Reputable Member

Nope.

Repeating one more time - NLBA program running OK, current account has full Admin rights!

[If you are not SW coder, please spare your time to other things]

Updater program starting from NLBA program DOESN'T run!

EXE from downloaded ZIP executed OK !

 

Most likely the program requested or incorrectly inherit access to mentioned above folder. Just debug the case and fix it.

NLBA_LaptopBatteryAnalyzerUpdate.exe

Lets Make NLBA Great ! Together.

Topic starter Posted : 26/09/2021 2:44 am
DjiBattWorkshop
(@djibattworkshop)
Member Moderator
Posted by: @batfix

and the Updater opening the path incorrectly - check and compare your own source code

If there is mistake in source code then this issue should be encountered for everyone, correct?

 

Posted : 26/09/2021 9:39 am
torture
(@torture)
Member Moderator

@batfix 

Try it and you will see that it works.

Posted by: @batfix

[If you are not SW coder, please spare your time to other things]

I'm definetely NOT a software coder, i don't know about you and honetsly i don't care.

I'm just giving you a 2 seconds solution to the same problem that i had.

Take it or not is your choice.

 

Posted by: @batfix

Repeating one more time - NLBA program running OK, current account has full Admin rights!

My account also has full Admin rights, but still this is the solution.

Posted : 26/09/2021 9:54 am
Page 1 / 2
Share: