Jump to content

Flash Silent Install


Recommended Posts

Hi Everyone, hope you all had a nice weekend ..

I need some more advice , i am a little stuck .. another program of mine is trying to make something that will install programs as me the admin on the users computer .. right now i am trying to figure out how to install flash player ..

i have this so far , which works , but when i had a user try it .. it ran and did everything it should have , but when i went into add/remove programs flash wasn't listed , so it didn't install .. for right now i am just trying to make a exe file that i can send the users to have them install it , at some point i would like to be able just to do a txt file with a list of computers in it ..

any advice ??

; Installing Flash Player 10 ActiveX
 
Local $sUserName = "username"
Local $sPassword = "password"
 
RunAs($sUserName, @ComputerName, $sPassword, 0, @ComSpec, @SystemDir)
 
FileFindFirstFile ("flashplayer10.msi")
 
FileCopy ("\\server\Adobe Installer\flash.exe" , "c:\")
 
RunWait(@ComSpec & ' /c msiexec /i "\\server\Adobe\flashplayer10.msi" /qn')
 
MsgBox(4096, " Flash Custom Installer ", "  Flash Player Has Been Installed ")
 
FileDelete ("c:\flash.exe")
Edited by startrek133
Link to comment
Share on other sites

I may be a little rusty on my memory of the docs but can't you use FileInstall()?

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
Share on other sites

I tried fileinstall rcmaehl and it strange , it looks like it worked , but when you go into add / removed programs flash is not listed there .. :mellow:

; Installing Flash Player 10 ActiveX
 
 
Local $sUserName = "username"
Local $sPassword = "password"

RunAs($sUserName, @ComputerName, $sPassword, 0, @ComSpec, @SystemDir)
 
FileFindFirstFile ("flashplayer10.msi")

 
 
MsgBox(4096, " Flash Custom Installer ", "  Flash Player Has Been Installed ")
 
 
FileInstall ("\\server\Adobe\flashplayer10.exe", "c:\")
Link to comment
Share on other sites

Your runas command isn't doing anything, that's why it's not working. You're running CMD with it under your credentials, not running the msi file. Then you use RunWait to run the msi file, instead of using RunAs to do it.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

What I said was pretty clear, you're trying to run the msi file with the RunWait command and not with the RunAs command going by your first post. Your RunAs command is only running CMD.EXE when you execute that command line, it's not running the MSI file in the second command line's RunWait command. You have to run your msi file with the RunAs command if you want it to run under different credentials.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

ok i think i get it ..

so something like this then ..

RunAs($sUserName, "domain", $sPassword, '""msiexec /i "\\server\Adobe\flashplayer10.msi"" /qn')

Something along the lines like this:

RunAs($sUserName,"domain",$sPassword,0, '""msiexec /i "\\server\Adobe\flashplayer10.msi"" /qn')

I'm not sure of the placement of the quotes as I didn't actually run it, but you forgot the " ,0" in there in your string. :mellow:

Edited by BrewManNH

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

hhmmm well just logged into a computer as a trainee and ran the flash.exe and nothing .. got my popup box about it being installed , but it wasn't ..

i hate syntax errors, everything looks right and it runs , but doesn't work ..

; Installing Flash Player 10 ActiveX
 
 
Local $sUserName = "username"
Local $sPassword = "password"
 
RunAs($sUserName, @ComputerName, $sPassword, 0, @ComSpec, @SystemDir)
 
FileCopy ("\\server\Adobe Installer\flash.exe" , "c:\")

RunAs($sUserName, "domain", $sPassword, 0, '"msiexec /i" [, "\\server\Adobe\flashplayer10.msi"] /qn')
 
MsgBox(4096, " Flash Custom Installer ", "  Flash Player Has Been Installed ")

FileDelete ("c:\flash.exe")
Link to comment
Share on other sites

hhmmm well just logged into a computer as a trainee and ran the flash.exe and nothing .. got my popup box about it being installed , but it wasn't ..

i hate syntax errors, everything looks right and it runs , but doesn't work ..

; Installing Flash Player 10 ActiveX
 
 
Local $sUserName = "username"
Local $sPassword = "password"
 
; RunAs($sUserName, @ComputerName, $sPassword, 0, @ComSpec, @SystemDir) <<<<<<<<<< Not needed
 
; FileCopy ("\\server\Adobe Installer\flash.exe" , "c:\") <<<< Only needed if you're running it off of the C: drive
 
RunAs($sUserName, "domain", $sPassword, 0, '"msiexec /i "' &  '"\\server\Adobe\flashplayer10.msi"]\\server\Adobe\flashplayer10.msi"' &  "/qn") ;<<<< Try this, still not 100% sure of the quotes
 
MsgBox(4096, " Flash Custom Installer ", "  Flash Player Has Been Installed ")
 
FileDelete ("c:\flash.exe")

EDIT: Man I hate this new board software and what it's doing to code tags. :mellow:

Edited by BrewManNH

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

yea tell me about it ..

well i tired all sorts of different " ' [ and stuff like that with no luck ..

any advice ??

; Installing Flash Player 10 ActiveX
 
 
Local $sUserName = "username"
Local $sPassword = "password"
 
 
RunAs($sUserName, "domain", $sPassword, 0, '"msiexec /i" [, "\\server\Adobe\flashplayer10.msi"] /qn')

MsgBox(4096, " Flash Custom Installer ", "  Flash Player Has Been Installed ")
Link to comment
Share on other sites

yea tell me about it ..

well i tired all sorts of different " ' [ and stuff like that with no luck ..

any advice ??

; Installing Flash Player 10 ActiveX
 
 
Local $sUserName = "username"
Local $sPassword = "password"
 
 
RunAs($sUserName, "domain", $sPassword, 0, '"msiexec /i" [, "\\server\Adobe\flashplayer10.msi"] /qn')
 
MsgBox(4096, " Flash Custom Installer ", "  Flash Player Has Been Installed ")

Well what I normally do is to get the command working from the comman prompt first.

The cut and paste the command into your scirpt so you remember how it's supposed to be. :mellow:

<code>

; Installing Flash Player 10 ActiveX

Local $sUserName = "username"

Local $sPassword = "password"

; msiexec /i "\\server\Adobe\flashplayer10.msi" /qn

RunAs($sUserName, @ComputerName, $sPassword, 0, 'msiexec /i , "\\server\Adobe\flashplayer10.msi" /qn', @TempDir)

MsgBox(4096, " Flash Custom Installer ", " Flash Player Has Been Installed ")

</code>

Good Luck

John Morrison

Edit: Forum edit messing up :)

Edited by storme
Link to comment
Share on other sites

Make sure there's no comma or brackets between the msiexec /I and the file to be run.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

I got it !!!!!!!

i found another post , with code i didnt think would work , but just tested on some of the user here and works great .. :mellow:

now the next trick is to see if i can get it to install using a list of computers from a txt file ??

here is the code i found ..

RunAsWait($sUserName, $snetwork, $sPassword, 4, "MSIEXEC.EXE /i flashplayer10.msi /qn","\\server\Adobe", @SW_Hide)
Link to comment
Share on other sites

I got it working !!!

thanks everyone for the help ..

; Installing Flash Player 10 ActiveX
 
 
#include <File.au3>
 
Global $sUserName = "username"
Global $sPassword = "password"
Global $sNetwork = "domain"
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;uninstall current verison of flash player
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
RunAsWait($sUserName, $sNetwork, $sPassword, 4, "\\server\Adobe\unflash.exe -uninstall")
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;install current verison of flash player
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
RunAsWait($sUserName, $sNetwork, $sPassword, 4, "MSIEXEC.EXE /i flashplayer10.msi /qn","\\server\Adobe", @SW_Hide)
Edited by startrek133
Link to comment
Share on other sites

  • 1 month later...

I got it working !!!

thanks everyone for the help ..

; Installing Flash Player 10 ActiveX
 
 
#include <File.au3>
 
Global $sUserName = "username"
Global $sPassword = "password"
Global $sNetwork = "domain"
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;uninstall current verison of flash player
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
RunAsWait($sUserName, $sNetwork, $sPassword, 4, "\\server\Adobe\unflash.exe -uninstall")
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;install current verison of flash player
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
RunAsWait($sUserName, $sNetwork, $sPassword, 4, "MSIEXEC.EXE /i flashplayer10.msi /qn","\\server\Adobe", @SW_Hide)

I have been trying to do something similar to this, and I cannot get it working. If I copy the commands out and run them in cmd prompt they woek (with out running as someone else) but I cannot get the script working. Although I am not getting a error.

<code>

; Installing Flash Player 11 ActiveX

Global $sUserName = "UserName"

Global $sPassword = "Password"

Global $sNetwork = "Domain"

;Uninstall Flash Player

RunAsWait($sUserName, $sNetwork, $sPassword, 4, '"\\arnell\software$\Adobe\Flash Player\uninstall flash\uninstall_flash_player.exe" -uninstall')

;Install Flash Player

RunAsWait($sUserName, $sNetwork, $sPassword, 4, 'MSIEXEC.EXE /i "\\arnell\software$\Adobe\Flash Player\11.0.1.152\32-bit\install_flash_player_11_active_x_32bit.msi" /qn', @SW_Hide)

</code>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...