受欢迎的博客标签

Office 32bit 64bit Completely uninstall Office tool Software

Published

各种版本的安装、卸载及版本检测源代码

Table of content

32-bit DLL

显示操作系统所有环境变量(vb6)

32-bit and 64-bit environments.

如何判断操作系统位数是32位还是64位

 

office2013怎么查看版本

 

How to Install Office 2013 64bit on a PC?

How to Uninstall Office from a PC?

 

1. 32-bit DLL

If you do know what that 32-bit DLL does, for example, it is just a wrapper of Window 32 API calls, you can directly call the Window API in AutoCAD VBA with necessary modification because of 64-bit (such as change Long type to LongPtr type...).

 

OS 32 bit
如果操作系统是32位的,Office肯定是 32 bit,因为只能安装32位Office。

OS 64 bit

64位系统中可能存在以下4种情况:

安装了32位Office
安装了64位Office
安装了32位和64位两个版本Office
没安装任何Office

 

32-bit and 64-bit environments

VBA  32-bit and 64-bit

1.在 Office 2007 版本及以前,都是32 bit的 office。VBA的 版本为  vb6 和更早版本,编写的 VBA 代码,为 VBA  32-bit,

2.从 Microsoft Office 2010 开始,VBA 为 32bit 还是 64 bit,与安装的Office 是32 bit or 64 bit 有关。

In Microsoft Office 2010, VBA includes language features that enable VBA code to run correctly in both 32-bit and 64-bit environments.

How to install Office 32-bit or  Office 64-bit?

By default, Office 2010, 2013 and 2016 install the 32-bit version. You must explicitly choose download to install the 64-bit version during setup. 


Starting with Office 2019 and Microsoft 365, the default is the 64-bit version.

 

Install or reinstall Microsoft 365 64-bit or Office 2021 64-bit

The 64-bit version is installed by default unless Office detects you already have a 32-bit version of Office (or a stand-alone Office app such as Project or Visio) installed. In this case, the 32-bit version of Office will be installed instead.

To change from a 32-bit version to a 64-bit version or vice versa, you need to uninstallOffice first (including any stand-alone Office apps you have such as Project of Visio). Once the uninstall is complete, sign in again to www.office.com and select Other install options, choose the language and version you want (64 or 32-bit), and then select Install. 

 

如何判断Office是32位还是64位

方法:条件编译法

在VBA模块中运行如下过程,看看返回的是哪一个对话框。

Sub 判断Office位数()
    #If Win64 Then
        MsgBox "64bit"
    #Else
        MsgBox "32bit"
    #End If
End Sub

detail:https://www.cnblogs.com/ryueifu-VBA/p/12316742.html

 

#if Vba7 then
'  代码正在新 VBA7 编辑器中运行
#if Win64 then
'  代码正在 64 位版本的 Microsoft Office 中运行
#else
'  代码正在 32 位版本的 Microsoft Office 中运行
#end if
#else
' 代码正在 VBA 版本 6 或更早版本中运行
#end if

see:https://www.cnblogs.com/duanyuerui/p/6958631.html

 

1.c++

https://blog.csdn.net/xuqiang918/article/details/8276701

2.C#源码

原理:通过注册表判断office版本信息

缺点:

不能准确的判断出安装的版本,代码中是从HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office找版本信息,因此获得的版本信息不准确,很容易出错。

https://download.csdn.net/download/guying07128/5208466

3.vb

检测一个系统中的Office语言版本(比如:中文版,英文版)

Sub LangSetting()
    If Application.Language = msoLanguageIDEnglishUS Then
        MsgBox "The user interface language is U.S. English."
    Else
        MsgBox "The user interface language is not U.S. English."
    End If
End Sub
application.language和application.version
程序通过Application.OperatingSystem获取当前操作系统的版本

关于获取操作系统版本信息的文档,可在https://docs.microsoft.com/zh-cn/office/vba/api/excel.application.operatingsystem找到。

 

显示操作系统所有环境变量

vb

Attribute VB_Name = "module7_LogWriter"
'---------------------------------------------------------------------------------------
' Module    : ģ��7_LogWriter
' Author    : Administrator
' Date      : 2021/6/27
' Purpose   :
' call      : call ģ��7_LogWriter.LogInformation("dddd")
' https://www.exceltip.com/files-workbook-and-worksheets-in-vba/log-files-using-vba-in-microsoft-excel.html
'---------------------------------------------------------------------------------------

Sub LogMyApp(ByVal sFunctionName As String, ByVal sLogEntry As String)



    Dim directory As String

    Dim ActiveWorkbookName As String

    Dim ThisWorkbookPath As String

    directory = ActiveWorkbook.Path

    ActiveWorkbookName = ActiveWorkbook.Name
    ThisWorkbookPath = ThisWorkbook.Path

    Dim LogFileName As String
    LogFileName = directory & "\vbadll\vba" & Format(CDate(Now()), "YYYYMMDD") & ".log"
    
    
    


    Dim FileNum As Integer

    'Declare variable
    Dim strUserName As String
    Dim strComputerName As String

    strComputerName = Environ("COMPUTERNAME")

    'Get system logged in user name
    strUserName = Environ("Username")


    LogMessage = strComputerName & "-" & strUserName & LogMessage


    Rem Application.OperatingSystem��ȡ��ǰ����ϵͳ�İ汾
    OperatingSystemVersion = Application.OperatingSystem


    


    'MsgBox Environ("username")

    Dim x As Integer
    Dim Env As String

    x = 1
    Env = Environ(x)
    Do Until Env = ""
        Env = Environ(x)
        'MsgBox Env
        x = x + 1
    Loop


    FileNum = FreeFile    ' next file number

    Open LogFileName For Append As #FileNum    ' creates the file if it doesn't exist

    Print #FileNum, Now & "|ComputerName and Username��" & strComputerName & "|" & strUserName & "|" & sFunctionName & "|" & sLogEntry

    Close #FileNum    ' close the file

End Sub

如何判断操作系统位数是32位还是64位

C#

detail:https://www.cnblogs.com/czzju/articles/2482474.html

 

存在的问题

1.在 64 位 Office 中运行旧 VBA 代码的问题在于,将 64 位加载到 32 位数据类型中会截断 64 位数。这会导致内存溢出、代码中出现意外结果,并且可能导致应用程序故障。

 

office2013怎么查看版本

 

How to Install Office 2013 64bit on a PC?

To Install  a  Office 2013 64-bit version , you need to uninstall Office first (including any stand-alone Office apps you have such as Project of Visio).

step 1: uninstall old office 2010 32bit

 

How to Uninstall Office from a PC?

How to Uninstall Office 2010 from a PC?

step 1: uninstall  Microsoft Access Database Engine error

Hi, i'm having problems deploying Office 2013 64bit. 

I finally tracked it down to Automation Studio having installed the Microsoft Access database engine 2010 which is preventing the install. 

However, I cannot uninstall it via a script which I can deploy (manually removing it is fine but unfeasible for the amount of machines I need to do this on)

买电脑自带的windows 8.1 x86 (正版激活)环境,已安装 office 2013 家庭版,试用(好像记得是21天)到期后,于 控制面板–程序 内将其卸载,中途并未出错。

正确卸载后,重启,下载office 2013 专业版,在安装过程中提示无法安装,再次安装时又提示电脑已存在不同版本的软件。这个恐怕是很多朋友在安装过程中头疼的事,本文主要讲述了官方Office2013完全卸载方法,正确的完全卸载office2013。

 

用Office 2013/Office 365 微软官方专用卸载工具

 

step 2:Completely uninstall Office tool Software

download  Completely uninstall Office with the uninstall support tool SetupProd_OffScrub.exe from microsoft

https://outlookdiagnostics.azureedge.net/sarasetup/SetupProd_OffScrub.exe

step 2:run SetupProd_OffScrub.exe as administrator

 

output

<?xml version="1.0" encoding="utf-8"?>
<Results>
  <Analyzer>
    <Title>正在运行 Office 卸载诊断。</Title>
    <Result>True</Result>
    <Duration>00:52:54</Duration>
    <ResultTitle>已完成卸载 Office</ResultTitle>
    <ResultUserMessage>
</ResultUserMessage>
    <ResultAdminMessage />
    <ResultSupportMessage />
    <AdvancedHttpResponseInfo />
    <Exception />
  </Analyzer>
</Results>

reboot windows

C:\Users\Administrator2\AppData\Local\SaRALogs\Log\SaraLog-20211010-0-0

10/09/2021 21:12:58,6928,1,Info,HRC,##InstalledMsiVersions: 
10/09/2021 21:12:59,6928,1,Info,HRC,##InstalledC2RVersions:ProductName: Getting all Add/Remove Programs items.

10/09/2021 21:12:59,6928,1,Info,HRC,##InstalledMsiVersions: 
10/09/2021 21:13:00,6928,1,Info,HRC,##Could not find Outlook install path.

...

10/09/2021 22:11:33,6928,8,Info,App,##Cleaning up WorkflowManager
10/09/2021 22:11:33,6928,8,Info,App,##WorkflowManager is cleaned up
10/09/2021 22:11:33,6928,8,Info,App,##Flushing telmetry

https://support.microsoft.com/en-us/office/uninstall-office-from-a-pc-9dd49b83-264a-477a-8fcc-2fdf5dbf61d8?ui=en-us&rs=en-us&ad=us