zoukankan      html  css  js  c++  java
  • Setup Factory 9制作包含ArcGIS Engine的安装包的脚本

    使用Setup Factory 9制作包含ArcGIS Engine的安装包的脚本
    【屏幕】->【安装之后】->【编辑】->【操作】->【On Next】

    -- These actions are performed when the Next button is clicked.
    -- 询问用户是否安装ArcGIS Engine Runtime 和 ArcGIS license manager
    result = Dialog.Message("注意", "是否继续安装 ArcGIS Engine ?", MB_YESNO, MB_ICONQUESTION, MB_DEFBUTTON1);

    if (result == IDYES) then
    -- 如果ArcGIS runtime 自解压文件不存在,则退出安装程序
    if not File.DoesExist("%TempLaunchFolder%\arcgis runtime.exe") then
    rs = Dialog.Message("注意", "ArcGIS Engine Runtime 自解压文件不存在,请重新执行安装程序!", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
    Screen.Next();
    end

    -- ****************************************************************************************
    -- *********************step 01.安装 ArcGIS Engine Runtime*********************************

    -- 如果选择安装,则执行arcgis runtime.exe自解压文件到C:\temp\临时目录
    Shell.Execute(SessionVar.Expand("%TempLaunchFolder%\arcgis runtime.exe"), "open", "", "", SW_SHOWNORMAL, true);

    -- 判断该程序是否执行完毕,才能继续下一步
    repeat
    setupend = File.IsInUse(SessionVar.Expand("%TempLaunchFolder%\arcgis runtime.exe"));
    until not setupend

    -- 如果安装文件不存在则退出安装程序
    if not File.DoesExist("C:\temp\arcgis runtime\setup.exe") then
    rs = Dialog.Message("注意", "ArcGIS Engine Runtime 安装文件不存在,请重新执行安装程序!", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
    Screen.Next();
    end

    -- 继续执行arcgis runtime目录中的Setup.exe
    Shell.Execute(SessionVar.Expand("C:\temp\arcgis runtime\setup.exe"), "open", "", "", SW_SHOWNORMAL, true);

    -- 判断setup.exe程序是否执行完毕,完毕后才能继续下一步
    repeat
    setupend = File.IsInUse(SessionVar.Expand("C:\temp\arcgis runtime\setup.exe"));
    until not setupend

    -- 判断setup.msi程序是否执行完毕,完毕后才能继续下一步
    repeat
    setupend = File.IsInUse(SessionVar.Expand("C:\temp\arcgis runtime\setup.msi"));
    until not setupend

    -- ****************************************************************************************
    -- *********************step 02.安装 ArcGIS_Engine_Runtime_中文补丁************************

    -- 如果ArcGIS_Engine_Runtime_中文补丁文件不存在,则退出安装程序
    if not File.DoesExist("%TempLaunchFolder%\ArcGIS_Engine_Runtime_中文补丁.msi") then
    rs = Dialog.Message("注意", "ArcGIS Engine Runtime 中文补丁文件不存在,请重新执行安装程序!", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
    Screen.Next();
    end

    -- 执行ArcGIS_Engine_Runtime_中文补丁.msi
    Shell.Execute(SessionVar.Expand("%TempLaunchFolder%\ArcGIS_Engine_Runtime_中文补丁.msi"), "open", "", "", SW_SHOWNORMAL, true);

    -- 判断该程序是否执行完毕,才能

    继续下一步
    repeat
    setupend = File.IsInUse(SessionVar.Expand("%TempLaunchFolder%\ArcGIS_Engine_Runtime_中文补丁.msi"));
    until not setupend

    -- ****************************************************************************************
    -- *********************step 03.安装 ArcGIS Engine 10 SP4(简体中文)**********************

    -- 如果ArcGIS Engine 10 SP4(简体中文)自解压文件不存在,则退出安装程序
    if not File.DoesExist("%TempLaunchFolder%\ArcGISEngine10SP4_SimplifiedChinese.exe") then
    rs = Dialog.Message("注意", "ArcGIS Engine 10 SP4(简体中文)自解压文件不存在,请重新执行安装程序!", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
    Screen.Next();
    end

    -- 执行ArcGISEngine10SP4_SimplifiedChinese.exe自解压文件到C:\temp\临时目录
    Shell.Execute(SessionVar.Expand("%TempLaunchFolder%\ArcGISEngine10SP4_SimplifiedChinese.exe"), "open", "", "", SW_SHOWNORMAL, true);

    -- 判断该程序是否执行完毕,才能继续下一步
    repeat
    setupend = File.IsInUse(SessionVar.Expand("%TempLaunchFolder%\ArcGISEngine10SP4_SimplifiedChinese.exe"));
    until not setupend

    -- 如果安装文件不存在则退出安装程序
    if not File.DoesExist("C:\temp\ArcGISEngine10SP4_SimplifiedChinese\Setup.exe") then
    rs = Dialog.Message("注意", "ArcGIS Engine 10 SP4(简体中文)安装文件不存在,请重新执行安装程序!", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
    Screen.Next();
    end

    -- 继续执行ArcGISEngine10SP4_SimplifiedChinese目录中的Setup.exe
    Shell.Execute(SessionVar.Expand("C:\temp\ArcGISEngine10SP4_SimplifiedChinese\Setup.exe"), "open", "", "", SW_SHOWNORMAL, true);

    -- 判断Setup.exe程序是否执行完毕,完毕后才能继续下一步
    repeat
    setupend = File.IsInUse(SessionVar.Expand("C:\temp\ArcGISEngine10SP4_SimplifiedChinese\Setup.exe"));
    until not setupend

    -- ****************************************************************************************
    -- *********************step 04.安装 ArcGIS license manager********************************

    -- 如果ArcGIS license manager 自解压文件不存在,则退出安装程序
    if not File.DoesExist("%TempLaunchFolder%\arcgis license manager.exe") then
    rs = Dialog.Message("注意", "ArcGIS license manager 自解压文件不存在,请重新执行安装程序!", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
    Screen.Next();
    end

    -- 执行arcgis license manager.exe自解压文件到C:\temp\临时目录
    Shell.Execute(SessionVar.Expand("%TempLaunchFolder%\arcgis license manager.exe"), "open", "", "", SW_SHOWNORMAL, true);

    -- 判断该程序是否执行完毕,才能继续下一步
    repeat
    setupend = File.IsInUse(SessionVar.Expand("%TempLaunchFolder%\arcgis license manager.exe"));
    until not setupend

    -- 如果安装文件不存在则退出安装程序
    if not File.DoesExist("C:\temp\arcgis license manager\Setup.exe") then

    rs = Dialog.Message("注意", "ArcGIS license manager 安装文件不存在,请重新执行安装程序!", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
    Screen.Next();
    end

    -- 继续执行arcgis license manager目录中的Setup.exe
    Shell.Execute(SessionVar.Expand("C:\temp\arcgis license manager\Setup.exe"), "open", "", "", SW_SHOWNORMAL, true);

    -- 判断Setup.exe程序是否执行完毕,完毕后才能继续下一步
    repeat
    setupend = File.IsInUse(SessionVar.Expand("C:\temp\arcgis license manager\Setup.exe"));
    until not setupend

    -- 判断setup.msi程序是否执行完毕,完毕后才能继续下一步
    repeat
    setupend = File.IsInUse(SessionVar.Expand("C:\temp\arcgis license manager\setup.msi"));
    until not setupend

    -- ****************************************************************************************
    -- *********************step 05.删除临时文件********************************
    -- 安装完毕后删除临时文件
    Folder.DeleteTree("C:\temp\arcgis runtime\", nil);
    Folder.DeleteTree("C:\temp\arcgis license manager\", nil);
    Folder.DeleteTree("C:\temp\ArcGISEngine10SP4_SimplifiedChinese\", nil);

    end

    -- advance to the next screen
    Screen.Next();

  • 相关阅读:
    亚马逊云储存器S3 BCUKET安全性学习笔记
    (web)Bugs_Bunny_CTF_writeup 部分简单web
    给windows右键添加快捷启动程序
    nmap学习笔记
    暴力美学
    Metasploit学习笔记
    钓鱼+DNS欺骗学习笔记
    第 5 章 if 语句
    第 4 章 操作列表
    3.3 组织列表
  • 原文地址:https://www.cnblogs.com/lihaijia/p/14581402.html
Copyright © 2011-2022 走看看