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
> Open Windows 10 Update Screen In Code, Access 2016    
 
   
DaveH
post Nov 7 2019, 11:42 AM
Post#1



Posts: 26
Joined: 1-May 18



Does anyone know how to access/open what used to be a Control Panel (CPL) object “Windows Update” - in Windows 10… in code?

Although this is utilised in an installer for an Access database project which is written in VB.NET - after the Access 2016 runtime is installed, I have found that programmatically downloading the required updates (about 30) takes an absolute age so I would like the users to be able to observer whats happening as in Windows 10.

I can easily do this in Windows 7 but not 10. Is this even possible?

Developed on a Windows 7 machine for installation in 7 and 10.

Many thanks.
Go to the top of the page
 
jleach
post Nov 8 2019, 05:18 AM
Post#2


UtterAccess Administrator
Posts: 10,274
Joined: 7-December 09
From: St. Augustine, FL


Hi - try shelling the appropriate command:

CODE
Function OpenControlPanelUpdates()
  Shell "control update"
End Function


hth

--------------------
Jack D. Leach
Founder & CEO
Dymeng Services Inc.
Business Software Solutions
Go to the top of the page
 
DaveH
post Nov 8 2019, 06:36 AM
Post#3



Posts: 26
Joined: 1-May 18



Jack,

I've been searching for this command for ages...

Much appreciated, thanks a lot.

Dave.
Go to the top of the page
 
jleach
post Nov 8 2019, 06:45 AM
Post#4


UtterAccess Administrator
Posts: 10,274
Joined: 7-December 09
From: St. Augustine, FL


No problem. I was surprised it took me me quite a few tries as well to find the one that worked.

Cheers,

--------------------
Jack D. Leach
Founder & CEO
Dymeng Services Inc.
Business Software Solutions
Go to the top of the page
 
DaveH
post Nov 10 2019, 05:10 AM
Post#5



Posts: 26
Joined: 1-May 18



This may be of interest to someone concerning performing the same function as the VBA call to open the control Panel item Windows Update, Shell “control update”. This works in Windows 10 (from a VBA app) because the operating system “Shims” the call as Windows 10 Update is no longer in control panel but settings.

Below is the process in VB.NET that does the same thing: -


Dim Ops As String = My.Computer.Info.OSFullName.ToString
Dim SysDrive As String = Environment.GetEnvironmentVariable("SystemDrive")

If InStr(Ops, "Windows 10") Then
Process.Start("" & SysDrive & "\Windows\explorer.exe", "ms-settings:windowsupdate")
Environment.Exit(0)
End If
Go to the top of the page
 
cheekybuddha
post Nov 10 2019, 05:57 AM
Post#6


UtterAccess Moderator
Posts: 11,889
Joined: 6-December 03
From: Telegraph Hill


So, if you want to do the same thing from VBA you can use:
CODE
  Shell "explorer.exe ms-settings:windowsupdate", vbNormalFocus

Or, if you want to grab the process id in case you want to close the window programtically, you can use:
CODE
  Dim PID As Long

  PID = Shell("explorer.exe ms-settings:windowsupdate", vbNormalFocus)
' Use taskkill with PID to end process

--------------------


Regards,

David Marten
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    9th December 2019 - 05:29 AM