xephael Posted September 6, 2005 Posted September 6, 2005 I have an MSI file that I can't seem to force AutoIT to install... This is the code I eventually ended up using after digging through the forums:#include <GUIConstants.au3> GUICreate("Print On Demand", 400, 160) GuiCtrlCreatePic("P:\PrintOnDemand\logo.jpg",20,20,353,39) RunAsSet("user", "domain", "password") $POD = GUICtrlCreateButton("Install Print on Demand", 20, 80) GUISetState() ; display the GUI GUISetState() While 1 $MsiExec = StringUpper(@WindowsDir) & "\SYSTEM32\MSIEXEC /I " $SMSPoint = "\\mysever\PrintOnDemand" $msg = GUIGetMsg() Select Case $msg = $POD Run($MsiExec & '"' & $SMSPoint & "PrintOnDemand.msi" & '"') RunAsSet() ExitLoop Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEndWhen this code is run I get:"This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer Package"Running this from the commandline kicks it off fine though: msiexec /i "\\myserver\PrintOnDemand\PrintOnDemand.msi"Any ideas what is happening? I've tried a number of different methods but basically need runas functionality to kickoff this MSI.
GaryFrost Posted September 6, 2005 Posted September 6, 2005 #include <GUIConstants.au3> GUICreate("Print On Demand", 400, 160) GuiCtrlCreatePic("P:\PrintOnDemand\logo.jpg",20,20,353,39) RunAsSet("user", "domain", "password") $POD = GUICtrlCreateButton("Install Print on Demand", 20, 80) GUISetState(); display the GUI GUISetState() While 1 $MsiExec = @SystemDir & "\MSIEXEC /i " $SMSPoint = "\\mysever\PrintOnDemand" $msg = GUIGetMsg() Select Case $msg = $POD Run($MsiExec & '"' & $SMSPoint & "\PrintOnDemand.msi" & '"') RunAsSet() ExitLoop Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
xephael Posted September 7, 2005 Author Posted September 7, 2005 Thanks for the help, but it didn't make a difference... any other ideas on how to debug this or get it to work?
GaryFrost Posted September 7, 2005 Posted September 7, 2005 (edited) couldn't tell you, one thing I noticed when I made the change was you had left out a backslash. Edited September 7, 2005 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
Valuater Posted September 7, 2005 Posted September 7, 2005 (edited) Thanks for the help, but it didn't make a difference... any other ideas on how to debug this or get it to work?<{POST_SNAPBACK}>just a question... thats notMSI.exe ???i have an "instmsi.exe" on my computer8) Edited September 7, 2005 by Valuater
AutoChris Posted September 7, 2005 Posted September 7, 2005 (edited) just a question... thats notMSI.exe ???i have an "instmsi.exe" on my computer8)<{POST_SNAPBACK}>Adding to what Valuator said, change this and it should work (assuming all paths are correct). $SMSPoint = "\\mysever\PrintOnDemand\" Edited September 7, 2005 by SerialKiller
Developers Jos Posted September 7, 2005 Developers Posted September 7, 2005 Maybe similar issue as this issue yesterday ?? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
xephael Posted September 7, 2005 Author Posted September 7, 2005 Lets make this a lot more simple:RunAsSet("Administrator", @Computername, "password") $this = 'C:\Windows\System32\msiexec.exe /i "P:\AppInstall\PrintOnDemand\PrintOnDemand.msi"' Run($this) RunAsSet()Results in this from the Windows Installer: This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package.When I run this:RunAsSet("Administrator", @Computername, "password") FileChangeDir("P:\AppInstall\PrintOnDemand\") $this = 'C:\Windows\System32\msiexec.exe /i "P:\AppInstall\PrintOnDemand\PrintOnDemand.msi"' Run($this) RunAsSet()The script responds with: Line 5 (File "C:\Documents and Settings\setup\Desktop\POD.au3"):Run($this)Error: Unable to execute the external program.The directory name is invalid.This code work flawlessly though! $this = 'C:\Windows\System32\msiexec.exe /i "P:\AppInstall\PrintOnDemand\PrintOnDemand.msi"' Run($this)
xephael Posted September 7, 2005 Author Posted September 7, 2005 try running it manually from the command line (DOS window)use windows "runas" utility...<{POST_SNAPBACK}>Thanks a lot for the reply!I think you're on the right track and I get the same error using runas from the command line.So am I stuck not being able to install MSI's as another user?
xephael Posted September 8, 2005 Author Posted September 8, 2005 see my post above... if the runasset user has permissions on the share then my previous post works... (I tested) Lar.<{POST_SNAPBACK}>Thanks Larry! You Da Man!@#
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