使用脚本巧解office安装源问题(修正版)
- On Error Resume Next
- Const HKEY_CLASSES_ROOT = &H80000000
- strComputer = "."
- strFilePath = "\\Filesrv\Software\Office\" '定义office网络安装路径
- Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
- strKeyPath = "Installer\Products"
- oReg.EnumKey HKEY_CLASSES_ROOT, strKeyPath, arrStrings
- '从注册表strKeyPath键值下查询产品Microsoft Office 2000 SR-1 Professional和Microsoft Office Professional Edition 2003并定位安装路径
- For i=0 To UBound(arrStrings)
- strValueName = "ProductName"
- strkeypath1 = "Installer\Products\" & arrStrings(i)
- oReg.GetStringValue HKEY_CLASSES_ROOT, strkeypath1, strValueName, strValue1
- If InStr(strValue1, "Microsoft Office 2000 SR-1 Professional") Then
- strkeypath2 = strKeyPath1
- strOffVer = "Office2000\"
- strFullPath = strFilePath & strOffVer
- strfile = "DATA1.MSI"
- End If
- If InStr(strValue1, "Microsoft Office Professional Edition 2003") Then
- strkeypath2 = strKeyPath1
- strOffVer = "Office2003\"
- strFullPath = strFilePath & strOffVer
- strfile = "PRO11.MSI"
- End If
- Next
- '根据不同语言定位安装路径,只包含简、繁、英、日四种。
- strKeyPath3 = strKeyPath2
- strValueName3 = "Language"
- oReg.GetDWORDValue HKEY_CLASSES_ROOT,strKeyPath3,strValueName3,dwValue3
- If dwValue3 = "2052" Then
- strLang = "CN\"
- strKeyPath4 = strKeyPath3 & "\" & "SourceList"
- strValueName4 = "LastUsedSource"
- strValue4 = "n;1;" & strFullPath & strLang
- oReg.SetExpandedStringValue HKEY_CLASSES_ROOT,strKeyPath4,strValueName4,strValue4
- strKeyPath5 = strKeyPath3 & "\" & "SourceList"
- strValueName5 = "PackageName"
- strValue5 = strfile
- oReg.SetStringValue HKEY_CLASSES_ROOT,strKeyPath5,strValueName5,strValue5
- strKeyPath6 = strKeyPath3 & "\" & "SourceList" & "\" & "Net"
- strValueName6 = "1"
- strValue6 = strFullPath & strLang
- oReg.SetExpandedStringValue HKEY_CLASSES_ROOT,strKeyPath6,strValueName6,strValue6
- Elseif dwValue3 = "1028" Then
- strLang = "TC\"
- strKeyPath4 = strKeyPath3 & "\" & "SourceList"
- strValueName4 = "LastUsedSource"
- strValue4 = "n;1;" & strFullPath & strLang
- oReg.SetExpandedStringValue HKEY_CLASSES_ROOT,strKeyPath4,strValueName4,strValue4
- strKeyPath5 = strKeyPath3 & "\" & "SourceList"
- strValueName5 = "PackageName"
- strValue5 = strfile
- oReg.SetStringValue HKEY_CLASSES_ROOT,strKeyPath5,strValueName5,strValue5
- strKeyPath6 = strKeyPath3 & "\" & "SourceList" & "\" & "Net"
- strValueName6 = "1"
- strValue6 = strFullPath & strLang
- oReg.SetExpandedStringValue HKEY_CLASSES_ROOT,strKeyPath6,strValueName6,strValue6
- Elseif dwValue3 = "1041" Then
- strLang = "JP\"
- strKeyPath4 = strKeyPath3 & "\" & "SourceList"
- strValueName4 = "LastUsedSource"
- strValue4 = "n;1;" & strFullPath & strLang
- oReg.SetExpandedStringValue HKEY_CLASSES_ROOT,strKeyPath4,strValueName4,strValue4
- strKeyPath5 = strKeyPath3 & "\" & "SourceList"
- strValueName5 = "PackageName"
- strValue5 = strfile
- oReg.SetStringValue HKEY_CLASSES_ROOT,strKeyPath5,strValueName5,strValue5
- strKeyPath6 = strKeyPath3 & "\" & "SourceList" & "\" & "Net"
- strValueName6 = "1"
- strValue6 = strFullPath & strLang
- oReg.SetExpandedStringValue HKEY_CLASSES_ROOT,strKeyPath6,strValueName6,strValue6
- Elseif dwValue3 = "1033" Then
- strLang = "EN\"
- strKeyPath4 = strKeyPath3 & "\" & "SourceList"
- strValueName4 = "LastUsedSource"
- strValue4 = "n;1;" & strFullPath & strLang
- oReg.SetExpandedStringValue HKEY_CLASSES_ROOT,strKeyPath4,strValueName4,strValue4
- strKeyPath5 = strKeyPath3 & "\" & "SourceList"
- strValueName5 = "PackageName"
- strValue5 = strfile
- oReg.SetStringValue HKEY_CLASSES_ROOT,strKeyPath5,strValueName5,strValue5
- strKeyPath6 = strKeyPath3 & "\" & "SourceList" & "\" & "Net"
- strValueName6 = "1"
- strValue6 = strFullPath & strLang
- oReg.SetExpandedStringValue HKEY_CLASSES_ROOT,strKeyPath6,strValueName6,strValue6
- End If
使用脚本巧解office安装源问题(修正版)相关推荐
- Office安装源损坏
故障现象:安装office时,提示"Microsoft office安装程序无法继续,因为安装源错误". 解决方案: 1.从Microsoft下载中心,下载最新版本Microsof ...
- linux下载gitlab文件,Linux下安装Gitlab10(修正版)
原来发表的文章地址:Linux下安装Gitlab:步骤及方式不是最好的:其中 nginx 可以整合到之前就有的Nginx中不需要更改nginx pid让系统运行两个nginx. 系统是Centos7 ...
- 非常运维 一体化终端安全管理系统自动安装脚本详解
非常运维 一体化终端安全管理系统自动安装脚本详解 作者:高玉涵 时间:2019.03.13 13:52 博客:blog.csdn.net/cg_i 演示:https://v.youku.com/v ...
- 【SA8295P 源码分析】53 - mifs.build.tmpl 脚本详解:启动QNX procnto-smp-instr微内核、启动QNX串口终端shell、加载解析并执行ifs2_la.img
[SA8295P 源码分析]53 - mifs.build.tmpl 脚本详解:启动QNX procnto-smp-instr微内核.启动QNX串口终端shell.加载解析并执行ifs2_la.img ...
- 编写shell脚本实现自动化搭建安装LNMP平台全过程配置详解
注意:如果是输入的是字母的或者是输入等于0时,则会出现以下两种情况!!! 查看端口: 进到Nginx根目录查看创建好的测试网页: 注意:关闭防火墙或者设置防火墙规则!!! 访问Nginx网页: 访问P ...
- chrome linux添加图标,IT之家学院:Chromebook修改Linux容器安装源教程详解
在Chrome OS 70稳定版通道系统中谷歌给用户们带来全新UI的同时也带来一个非常重要的特性更新--那就是Linux容器.现在原生系统的Chrome OS用户们也能够使用到Linux的部分功能. ...
- linux设置操作系统安装盘的iso文件为安装源安装mysql服务_Linux 操作系统安装盘的定制...
Linux 操作系统安装盘的定制 汪伦伟 2005 年 3 月 01 日发布 1引言 通常由于某种实际应用,需要一个包含所有最近更新的RPM包的操作系统发布盘,以备在安装时一次完成所有的更新操作,或者 ...
- Linux如何编译安装源码包软件
一.什么是源码包软件: 顾名思义,源码包就是源代码的可见的软件包,基于Linux和BSD系统的软件最常见:在国内源可见的软件几乎绝迹:大多开源软件都是国外出品:在国内较为出名的开源软件有fcitx;l ...
- Linux操作系统下如何编译安装源码包软件
一.什么是源码包软件? 顾名思义,源码包就是源代码的可见的软件包,基于Linux和BSD系统的软件最常见:在国内源可见的软件几乎绝迹:大多开源软件都是国外出品:在国内较为出名的开源软件有fcitx;l ...
最新文章
- Visual Studio 2008 和 .NET 3.5 发布了
- springboot: ajax异步提交表单
- 用于显示本地通知的跨平台插件flutter_local_notifications
- [云炬创业管理笔记]第九章为创业成败而准备测试1
- com.android.dex.DexIndexOverflowException: Cannot merge new index 66299 into a non-jumbo instruction
- 人工智能之基于face_recognition的人脸检测与识别
- 我的C#/.NET学习诀窍——LINQPad
- 外媒:三星电子正与华为商讨芯片代工事宜
- 第一章 进程与线程的基本概念
- 根据中文字符串查询拼音声母
- 智能家居无线组网技术,WiFi芯片模组连接应用,物联网无线技术发展
- 有道词典使用离线翻译
- 教教大家系统之家装机大师怎么用?
- Excel打开csv文件乱码
- linux gpt分区挂载,GPT分区和挂载
- Android怎么实现解压文件,Android如何实现压缩和解压缩文件
- 基于 Robot Framework 实现网络自动化测试
- mapstruct使用
- type_traits之 析取 合取 否定
- Java日期 SimpleDateFormat,Calander使用
热门文章
- Python3,2段代码,给pdf文件添加水印,原来watermark还可以这么玩。
- 【ML31】Advanced K-means clustering algorithm
- 利用Collections.sort方法重写Comparator接口的compare方法对list集合排序
- SecureCRT8.5的下载、安装和注册(详细图解)
- 白盒测试基础知识(概念、目的、方法、工具)
- igraph的layout布局
- David Patterson 撰文:关于RISC-V的五个谬误
- 一个按键精灵后台发送消息的脚本
- 【Linux】编译的四个步骤
- windows11 Vmware16.2 挂起报错Workstation unrecoverable error: (vcpu-0)