Jump to content
Sign in to follow this  
Gurltech

New User here: Have a problem running an msi

Recommended Posts

Gurltech

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)

 

Share this post


Link to post
Share on other sites
JLogan3o13

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)

√-1 2^3 ∑ π, and it was delicious!

How to get your question answered on this forum!

Share this post


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
Sign in to follow this  

×