自动化MSI / EXE安装帮助 [英] Automating MSI / EXE installation help
问题描述
所以我试图构建一个脚本来将文件(MSI)复制到多台计算机然后执行。 在PS变得更好的时候,可以自由地分发软件。 下面是我的脚本,文件复制到根C:\和目标机器上
我看到msiexe进程在我运行脚本后不久就开始了。 但该软件从未安装或甚至显示为已启动。 (现阶段不沉默)。 我的电源外壳ISE说明了这个错误。
我是 我不知道 p a c k a g e c o u l d 没有 b e o b e n e d。
V e r i f y 这是一个 这是 p a c k a g e e x s s 一个 这是一个 你好b $ b $
c n n a c c s s 我, o r 不知道 这是 a p p l i c a t i o n v n n
d o r t o v e r i f y 这是一个 我是 我是 一个   v a l i d 我喜欢 我是
s t l l r r p a c k a g e。
$ server_names = Get-Content c:\ pc_list.txt
Foreach($ server_names中的$ server){
  ;            Copy-Item c:\ Test \test.msi -Destination
\\ $ server \ C $ -Recurse}
Invoke-Command -ComputerName $ server_names -ScriptBlock {& cmd / c"msiexec.exe /ic:\test.msi\"
想法?
将Invoke放入foreach循环并更改"-Computername
server_names配置" to--Computername
server"
So I am attempting to build a script to copy a file (MSI) to multiple computers and then execute. Free way to distribute software while I get better at PS. So below is my script, the file does copy to the root C:\ and on the destination machine I see msiexe process get started shortly after I run the script. But the software never installs or even shows as launched. (at this stage not silent). My power shell ISE states this error.
T h i s i n s t a l l a t i o n p a c k a g e c o u l d n o t b e o p e n e d .
V e r i f y t h a t t h e p a c k a g e e x i s t s a n d t h a t y o u
c a n a c c e s s i t , o r c o n t a c t t h e a p p l i c a t i o n v e n
d o r t o v e r i f y t h a t t h i s i s a v a l i d W i n d o w s I n
s t a l l e r p a c k a g e .
$server_names = Get-Content c:\pc_list.txt
Foreach ($server in $server_names){
Copy-Item c:\Test\test.msi -Destination
\\$server\C$ -Recurse}
Invoke-Command -ComputerName $server_names -ScriptBlock { & cmd /c "msiexec.exe /i c:\test.msi\"
thoughts?
Put the Invoke into the foreach loop and change "-Computername
server_names" to "-Computername
server"
这篇关于自动化MSI / EXE安装帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!