Question : Problem: MSI not register with Add/Remove program

I am trying to push out an msi using SCCM.  The status reported successful, but for some reason it's not showing in the add/remove program or creates a shortcut on the desktop if I use SCCM to push it out.  I look at the local drive and it looks like all the files are copied properly and registry enties are added correctly.  

But if I run the same script after I've logon locally with admin rights.  it's showing in the add/remove program.  



Answer : Problem: MSI not register with Add/Remove program

That is correct, only reason being, the user needs to have access to the SMS Distribution Point, if however you're going to have it executing locally i.e. downloaded than you wouldn't need domain access.  The user will still need to be a member of the local administrators group.

However the problem is you need to also specify a password which is why I tend to use AutoIT, see the script below, it hasn't been tested but should work all the same.

1. Download and Install AutoIT also recommend downloading and installing the AutoIT Script Editor http://www.autoitscript.com/autoit3/downloads.shtml
2. Copy and Paste the Script below into Scite (AutoIT Script Editor)
3. Edit the Script with your local username and password and save
4. Click Tools - Compile Script
5. You will find an executable has been created in the same folder as the script, double click the file to run.

Within the Program Properties just let it run as the user, i.e. not the system account

That's it.

I use AutoIT rather than Batch Files because there are just so many functions available to make scripting easy, it also does away with the old dos window + you can create Guis very easily, making the process much easier for the end user.

Hope that helps.

Cheers

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
#NoTrayIcon
 
; Gets SystemDrive Variable example C: and appends the directory medhost\system\
$BAT_MEDHOST = EnvGet('SYSTEMDRIVE') & '\medhost\system'
 
;Below is the commandline to runas a particular user, if you are going to use a domain user, just substitute @computername with 'DomainName'
$EXE_MSIEXEC = RunAs('UserName', @ComputerName, 'Password', 0, @SystemDir & 'MsiExec.exe /i "' & @ScriptDir & '\EDIS 4.2.msi" ALLUSERS=1 /m MSISPQJA /qn /l*v ' & @TempDir & '\medhost.log', '', @SW_HIDE)
 
;Waits for the Msiexec Process to finish before continuing
;I use this rather than RunAsWait because there can be multiple instances of MsiExec Running
_FNC_RUNWAIT($EXE_MSIEXEC)
 
;Below is the commandline to install the VB Script
$EXE_VBSEXEC = RunAs('UserName', @ComputerName, 'Password', 0, @SystemDir & '\CSCRIPT.EXE "' & @ScriptDir & '\DB.vbs"', '', @SW_HIDE)
 
;Same as Above
_FNC_RUNWAIT($EXE_VBSEXEC)
 
;Checks to see if the files exist on the local system and than copies the files if not
;It will also create the folder structure if the structure isn't already in place
If FileExists($BAT_MEDHOST & '\registerall.bat') <> 1 Then FileCopy(@ScriptDir & '\registerall.bat', $BAT_MEDHOST & '\registerall.bat', 8)
If FileExists($BAT_MEDHOST & '\registerallsilent.bat') <> 1 Then FileCopy(@ScriptDir & '\registerallsilent.bat', $BAT_MEDHOST & '\registerallsilent.bat', 8)
 
;Simple Runwait command similar to Dos Start /WAIT I assumed you didn't need Admin credentials, otherwise just use RunAs Commandline as above
RunWait($BAT_MEDHOST & '\registerallsilent.bat', '', @SW_HIDE)
 
;Function to wait until the process is completed
Func _FNC_RUNWAIT($TMP_EXTEXEC)
	While ProcessExists($TMP_EXTEXEC)
		Sleep(100)
	WEnd
EndFunc
Open in New Window Select All
Random Solutions  
 
programming4us programming4us