Jump to content

[ Solved ] Installating MSI package with another user


Recommended Posts

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 by Groumphy

----------------------GroumphyMore information about me [Fr]

Link to comment
Share on other sites

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 by 99ojo
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...