Jump to content

Recommended Posts

Hi,

I am currently working on a script to install a driver for a cardreader system and a software package both wrapped in a separate .msi package so that I can install them silently.

Until now I only have been focusing on the fundamental element of installing the drivers. And testing it on 2 vm’s which are Windows XP & 7 32bit (not using 64x). With the code that I am currently using it does work on Windows XP but on windows 7 I keep getting the following error when the script executes the .msi

ERROR_INSTALL_PACKAGE_OPEN_FAILED 1619

I know this is a rights issue but what I can’t understand is that I am executing the script as a system Administrator account, I also tried to push this the script with a management software we have. The management software runs the scripts it pushes under SYSTEM account with the same results.

My question is if some of you have some experience with this or maybe have some hints/examples how to approach this.

Here is what i have until now for the installation.

; Script Start - Add your code below here
FileInstall("C:\VM_SHARE\Omnikeydriver.msi", "C:\Omnikeydriver.msi", 1) ; HID_OMNIKEY3x21_x86_R1_2_6_5.msi
FileInstall("C:\VM_SHARE\SafeSign.msi", "C:\SafeSign.msi", 1) ; SafeSign-Identity-Client-3.0.40-admin.msi


$InstallDriver = ShellExecuteWait("msiexec.exe", '/i "C:\Omnikeydriver.msi" /q /norestart')
MsgBox ( 48, "Omnikey", "Return Value: " & $InstallDriver )

$InstallSafeSign = ShellExecuteWait("msiexec.exe", '/i "C:\SafeSign.msi" /q /norestart')
MsgBox ( 48, "Omnikey", "Return Value: " & $InstallSafeSign )

ConsoleWrite ( $InstallDriver & @CRLF & $InstallSafeSign )
Link to post
Share on other sites
  • Moderators

MSI error code 1619 states the package could not be opened, typically due to the file not being where it should be. This is typical of trying to copy to the root of C: on Win7. A couple of things you could try:

  • Place #RequireAdmin at the top of your script
  • Choose a different destination for your FileInstall, like @TempDir.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By DanielRossinsky
      What i'm trying to achieve is to bundle a few folders within the executable script and from what I've read it can be done with:
      #include <FileConstants.au3> FileInstall(src, dest, $FC_OVERWRITE) I know that src must be a literal string and cant be a variable or macro. However, I also learned that I cant just install a folder but there is a workaround that uses 7zip or winrar so that FileInstall extracts the folder to the desired location (e.g. to dest) so I wend and tried both variants: 
      I zipped a single folder just for testing. I winrared a single folder just for testing. Keep in mind that both the .zip and .rar are the same folder with the same content.
      The problem I ran into is that FileInstall simply moves the .rar or .zip folder to the desired location but it doesn't extract it!
      #RequreAdmin #include <FileConstants.au3> Func installESPLibraries() Local Const $sLibrariesPath = @LocalAppDataDir & "\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries" FileInstall("esp-libraries\ESP32-ADXL345.rar", $sLibrariesPath & "\", $FC_OVERWRITE) EndFunc installESPLibraries() The result I'm left with is that ESP32-ADXL345.rar just gets moved to $sLibrariesPath (so it does kinda work). The result I want is to have ESP32-ADXL345.rar extracted to the same location so that I have only a folder with the name ESP32-ADXL345 without any winrar files. Is there a way to achieve such a thing ? (because i'm sure there is).
      NOTE: I already did search the forum for such a solution:
      how to use fileinstall want to bundle my exe foldersfiles embedding images folders in exe However, They all show practical examples with files and none with folders (the third link mentions folders but has no examples) so I am at a loss as to how it should be done.
       
      EDIT:
      Thanks to @Musashi and @Nine for pointing out what I was missing! Also, I would like to add my solution:
      #RequreAdmin #include <FileConstants.au3> ; Create a local constant string to hold a path to the folder where we will be installing the libraries Local Const $sLibrariesPath = @LocalAppDataDir & "\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\" ; Unpack libraries.rar to the path we defined FileInstall("libraries.rar", $sLibrariesPath, $FC_OVERWRITE) ; Run the batch script to extract libraries.rar at the path we defined RunWait("unrar.bat " & $sLibrariesPath & " libraries.rar", "", @SW_HIDE) ; Deletes libraries.rar FileDelete($sLibrariesPath & "libraries.rar") I attached the .bat file I wrote to make it work. The reasoning for this solution is to show how its done cleanly with .rar files as I didn't see anyone do it this way. Hope it helps people in the future!
      unrar.bat
    • By lonardd
      Hi,
      I have a source Script where I inserted the following code lines to be able to extract the script source code anytime later if I run it with the /ExtractSourceCode:
      #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
      #AutoIt3Wrapper_UseX64=n
      #AutoIt3Wrapper_Change2CUI=y
      #AutoIt3Wrapper_Res_SaveSource=Y
      #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
      If StringInStr($cmdlineRaw, "/ExtractSourceCode") Then
          FileInstall(@ScriptFullPath, @ScriptDir & "\" & @ScriptName & ".txt", 1)  
          ;FileInstall("C:\Test.txt", @ScriptDir & "\Test.txt")
          Exit
      EndIf
      I used to be able to compile it on another computer some years ago without problems.
      Now I wanted to modify the code, so I extracted it, renamed the file *.au3, performd my little modification and rebuild.
      Strangely, I get this popup with Caption: Aut2Exe Error and Invalid FileInstall() function.
      BEfore I hit the OK button on the Popup, I can see the file is actually Built as I can see that an EXE file is created, but as I hit OK in that error dialog, the EXE disappears.
      Any advice?
      Thanks
      David
      I can't remember if I did it with Autoit 2 
      EPP_NF_Replacer_UBI.au3
    • By Barrtrek
      I get the "Unable to add resources" error related to AppData\Local\AutoIt v3\Aut2Exe when compiling with a large FileInstall of a 1.5GB file.  Is there a size limit I need to be aware of?  I've also disabled or removed Trend from three different machines and had the same results.  I've had issues like this in the past but have compiled after the Aut2Exe folder was excluded in AV.  That doesn't seem to be the problem this time around.  If I comment out the FileInstall the script compiles successfully.
    • By careca
      Hey there, im looking for a way to build something similar to winrar sfx archives.
      My idea is to somehow pack files into the exe (maybe fileinstall)
      and be able to extract each one to a specific folder if needed.
      Now here's the tricky part, i can't think of a way to update only part of the files like i do in winrar.
      And it would require some work with command line to be able to somehow get a list of the files packed in, and extract one for example.
      Does anyone know of any way to accomplish this? Also, fileinstall that can use variables would be nice.
      Best regards.
    • By Vijaya7890
      Hi...
      I am trying to add a record in Binary Table in an MSI file.
      As Binary table has two fields/columns Name &Data , I am giving any string for Name(column 1) and streaming binary data from a VBS file into Data(column 2) .
      I have tried with VB script and it is working fine,
      Here is the VB Script file
      Dim Installer Dim Database Dim View Dim Record Dim query query="INSERT INTO `Binary` (`Name`, `Data`) VALUES ('NewBlob', ?)" Set Installer = CreateObject("WindowsInstaller.Installer") Set Record = Installer.CreateRecord(1) Record.SetStream 1, "C:\Users\Admin\Desktop\coder\CA_Test.vbs" Set Database = Installer.OpenDatabase("C:\Users\Admin\Desktop\7z920.msi", 1) Set View = Database.OpenView(query) View.Execute Record Database.Commit when i tried the same thing in autoit it is not working and it is not giving any syntax error.
      AutoIt file: 
      #include <File.au3> $idVarInput_CAName="CA_Test" $filepath="C:\Users\Admin\Desktop\coder\CA_Test.vbs" $idVarInput_MSIPath="C:\Users\Admin\Desktop\7z920.msi" $value="?" Local $Query = "INSERT INTO Binary(Name,Data) VALUES('" & $idVarInput_CAName & "','" & $value & "')" $oInstaller = ObjCreate("WindowsInstaller.Installer") $oRec=$oInstaller.CreateRecord(1) $r=$oRec.SetStream(1,$filepath) $oDB = $oInstaller.OpenDataBase($idVarInput_MSIPath,1) $oView = $oDB.OpenView($Query) $oView.Execute($oRec) $oDB.commit() Please Help!
      Thanks...
×
×
  • Create New...