Groumphy Posted July 13, 2009 Posted July 13, 2009 (edited) Hello everybody, This is my come back on the forum.I try to install a MSI package in silent mode and that under an another user (administrator user). I've the following code : Global $s_version=1 Global $s_reseau="NETWORK.LAN" Global $s_utilisateur = "administrator" Global $s_motdepasse = "aqwrfv&é"'000001" Global $s_serveurdc1 = "server01" ; ... etc RunAsWait($s_utilisateur, $s_reseau, $s_motdepasse, 1, _RunDOS("MSIEXEC.EXE /i WSP.MSI /qn"))Or this : RunAsWait($s_utilisateur, $s_reseau, $s_motdepasse, 1, _RunDOS("MSIEXEC.EXE /i WSP.MSI /qn"), @WindowsDir, @SW_HIDE)Or this : RunAsWait($s_utilisateur, $s_reseau, $s_motdepasse, 1, ShellExecute(@ScriptDir & "\wsp.msi", "/q", @WindowsDir, "open",@SW_HIDE))Or this RunAs($s_utilisateur, $s_reseau, $s_motdepasse, 1, ShellExecuteWait(@ScriptDir & "\wsp.msi", "/q")...This is unsuccessfull to install the application in stealth mode ... With AutoIt, I think there is no problem (no error)...When I view the EventViewer, I've this : Event Type: Error Event Source: MsiInstaller Event Category: None Event ID: 11303 Date: 13/07/2009 Time: 9:54:56 User: NETWORK_DOM\groumphy Computer: BXL-NB001 Description: Product: winspiroPRO -- Error 1303.The installer has insufficient privileges to access this directory: C:\Program Files\Crystal Decisions. The installation cannot continue. Log on as an administrator or contact your system administrator. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. Data: 0000: 7b 44 46 41 33 31 31 31 {DFA3111 0008: 39 2d 41 34 44 38 2d 34 9-A4D8-4 0010: 37 44 37 2d 41 43 44 41 7D7-ACDA 0018: 2d 34 43 41 30 36 37 33 -4CA0673 0020: 46 33 45 41 43 7d F3EAC}My question: why the installing is under the user and not the administrator ? (this is the question... And this AutoIt who should do this ! I use only a combination of two command...Thanks for your help Edited July 17, 2009 by Groumphy ----------------------GroumphyMore information about me [Fr]
99ojo Posted July 13, 2009 Posted July 13, 2009 (edited) On 7/13/2009 at 12:34 PM, 'Groumphy said: Hello everybody, This is my come back on the forum. I try to install a MSI package in silent mode and that under an another user (administrator user). I've the following code : Global $s_version=1 Global $s_reseau="NETWORK.LAN" Global $s_utilisateur = "administrator" Global $s_motdepasse = "aqwrfv&é"'000001" Global $s_serveurdc1 = "server01" ; ... etc RunAsWait($s_utilisateur, $s_reseau, $s_motdepasse, 1, _RunDOS("MSIEXEC.EXE /i WSP.MSI /qn"))Or this : RunAsWait($s_utilisateur, $s_reseau, $s_motdepasse, 1, _RunDOS("MSIEXEC.EXE /i WSP.MSI /qn"), @WindowsDir, @SW_HIDE)Or this : RunAsWait($s_utilisateur, $s_reseau, $s_motdepasse, 1, ShellExecute(@ScriptDir & "\wsp.msi", "/q", @WindowsDir, "open",@SW_HIDE))Or this RunAs($s_utilisateur, $s_reseau, $s_motdepasse, 1, ShellExecuteWait(@ScriptDir & "\wsp.msi", "/q")... This is unsuccessfull to install the application in stealth mode ... With AutoIt, I think there is no problem (no error)... When I view the EventViewer, I've this : Event Type: Error Event Source: MsiInstaller Event Category: None Event ID: 11303 Date: 13/07/2009 Time: 9:54:56 User: NETWORK_DOM\groumphy Computer: BXL-NB001 Description: Product: winspiroPRO -- Error 1303.The installer has insufficient privileges to access this directory: C:\Program Files\Crystal Decisions. The installation cannot continue. Log on as an administrator or contact your system administrator. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. Data: 0000: 7b 44 46 41 33 31 31 31 {DFA3111 0008: 39 2d 41 34 44 38 2d 34 9-A4D8-4 0010: 37 44 37 2d 41 43 44 41 7D7-ACDA 0018: 2d 34 43 41 30 36 37 33 -4CA0673 0020: 46 33 45 41 43 7d F3EAC} My question: why the installing is under the user and not the administrator ? (this is the question... And this AutoIt who should do this ! I use only a combination of two command... Thanks for your help Hi, try: RunAsWait($s_utilisateur, $s_reseau, $s_motdepasse, 4, "MSIEXEC.EXE /i WSP.MSI /qn","Directory of WSP.MSI", @SW_Hide) instead of RunAsWait($s_utilisateur, $s_reseau, $s_motdepasse, 1, _RunDOS("MSIEXEC.EXE /i WSP.MSI /qn")) ;-)) Stefan Edited July 13, 2009 by 99ojo
Groumphy Posted July 13, 2009 Author Posted July 13, 2009 Hello, Thanks for your reply, I've try on 2 computers and this works. I try on another type of computer and I give you feedback G. ----------------------GroumphyMore information about me [Fr]
Groumphy Posted July 17, 2009 Author Posted July 17, 2009 Hi, OK, this is perfect. Sorry for this dump question And happy of the rapid reaction of the forum ! 've a nice day, G. (Why code=autoit doesn't modify the code ? In first there was ok !) ----------------------GroumphyMore information about me [Fr]
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now