Jump to content

Recommended Posts

Posted

I created a script that I thought was simple to create and deploy using SCCM

The msi runs fine but I cannot get the pop up message to display unless I allow the users to interact with the program in the SCCM Deployment package.

This is ok since they have to click ok to the pop up.

My problem is I cannot hide the msi I do not want the users to see the msi running all they should see is the pop up after the install is complete.

Is this even a possability?

Am I doing it wrong?

Go easy on me I have only been using Autoit for about a day but I really like the program.

 

;My Autoit script

ShellExecute("MsiExec.exe /i sqlany16.msi /qn", "", @SW_HIDE)
Sleep(9000)
DirCreate("C:ProgramDataMicrosoftWindowsStart MenuProgramsSQL Anywhere 16")
DirCopy("C:Program FilesSQL Anywhere 16", "C:ProgramDataMicrosoftWindowsStart MenuProgramsSQL Anywhere 16", 1)
FileCopy("C:Program FilesSQL Anywhere 16BIN64dbisql.exe", "C:ProgramDataMicrosoftWindowsStart MenuProgramsSQL Anywhere 16", 1)
FileCopy("C:Program FilesSQL Anywhere 16BIN64scjview.exe", "C:ProgramDataMicrosoftWindowsStart MenuProgramsSQL Anywhere 16", 1)
$key = "HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession ManagerEnvironment"
$val = "PATH"
$PATH = RegRead($key, $val)
$sAddThisPath = "C:Program FilesSQL Anywhere 16BIN64"
$sAddThisPath = "C:Program Filesdbeng16.exe"
$sAddThisPath = "C:Program Filesscjview.exe"
$PATH = $PATH & ";" & $sAddThisPath
RegWrite($key,$val,"REG_EXPAND_SZ",$PATH)
EnvUpdate()
; Display a message of whether the file exists or not.
FileExists ("c:Program FilesSQL Anywhere 16bin64dbeng16.exe")
MsgBox(4096, "BLS Software Distribution", "SQL Anywhere 16 successfully installed. Please Reboot Machine Before Using Application.", 0)

 

  • Moderators
Posted

Does it work if you just run the script locally, not through SCCM (i.e. is the MSI run hidden)?

I usually do this:

ShellExecute("MsiExec.exe /i sqlany16.msi /qn", "", @SW_HIDE)

like this:

ShellExecute("MsiExec.exe", "/i sqlany16.msi /qn", "", @SW_HIDE)

"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!

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.
×
×
  • Create New...