请问如何编写自动安装文件

bene0818 2004-08-26 05:04:43
现在我需要编写一个文件(.bat或者JScript)
实现如下功能:
1.执行某个安装文件Setup.msi,自动点击安装界面中的按钮,完成安装。(类似于自动安装)
2.安装成功后验证安装路径下某个文件是否存在。

请各位兄弟姐妹指点一二!谢谢!
...全文
168 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
incloud 2004-09-10
  • 打赏
  • 举报
回复
@echo off

SET source=%1

if not exist %source%\Setup.msi goto Error

SET source=%1

if "%2"=="" msiexec /i %source%\Setup.msi ALLUSERS="" /q

if "%2"=="c" msiexec /i %source%\Setup.msi ALLUSERS="" /q

if "%2"=="a" msiexec /i %source%\Setup.msi ALLUSERS=2 /q

@echo ???????? has been Installed!

%HOMEDRIVE%

cd \Program Files\?????????\

if not exist "?????????" @echo ?????????? is missing !

goto end

:Error
echo No setup file is found!

:End
womenspig 2004-08-27
  • 打赏
  • 举报
回复
4.把上述修改后改为winnt.sif拷至一张空白的软盘中。
womenspig 2004-08-27
  • 打赏
  • 举报
回复
1.[Unattended]

  UnattendMode=FullUnattended

  OemSkipEula=Yes

  OemPreinstall=Yes

  TargetPath=WINNT

  FileSystem=ConvertNTFS

  Repartition=Yes

  ExtendOemPartition=1

  [Data]

  UnattendedInstall=Yes

  MSDosInitiated=No

  AutoPartition=1

  [GuiUnattended]

  AdminPassword=YourPassword

  OEMSkipRegional=1

  TimeZone=20

  OemSkipWelcome=1

  [UserData]

  FullName="Information Technology - TSS"

  OrgName="University of Houston"

  ComputerName=TheTest

  ProductID=序列号

  [Display]

  BitsPerPel=16

  Xresolution=800

  YResolution=600

  Vrefresh=72

  [Identification]

  JoinWorkgroup = UH_IT

  [Networking]

  InstallDefaultComponents=Yes

  2.在[UserDate]段,填入你自己Windows2000的序列号。

  3.把AdminPassword=YourPassword中的YourPassword改为你要采用的管理员密码。


我说的这个是对2000系统的!
snowegale888 2004-08-26
  • 打赏
  • 举报
回复
up

6,872

社区成员

发帖
与我相关
我的任务
社区描述
Windows 2016/2012/2008/2003/2000/NT
社区管理员
  • Windows Server社区
  • qishine
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧