Powered By Blogger
Showing posts with label InstallShield. Show all posts
Showing posts with label InstallShield. Show all posts

Wednesday, August 6, 2014

Customized Logs for msi

For writing customized Logging in default msi logs.
You can implement this using either a vb script or an installscript.
Below is a sample log which I created in between creating IIS WEBSITE and APP using APPCMD.

MSI (s) (A0:98) [11:02:47:417]: Hello, I'm your 32bit Impersonated custom action server.
Action start 11:02:47: callthis.
Custom Log: 7/11/2014 11:02:47 AM : Creating Site TestThisSite...
Custom Log: 7/11/2014 11:02:51 AM : Creating App WebUI under Site TestThisSite...
MSI (s) (A0:6C) [11:02:51:472]: Doing action: FindRelatedProducts
Action ended 11:02:51: callthis. Return value 0.

All you want to do is to include the below Function in your code.

InfoMessage “Here is my log”

Sub InfoMessage (MsgText)
            Const msiMessageTypeInfo = &H04000000
            Set oRec = session.Installer.createRecord(1)
            oRec.StringData(0) = "Custom Log: " & Now() & " : [1]"
            oRec.StringData(1) = MsgText
            Session.Message msiMessageTypeInfo, oRec
            Set oRec = Nothing
End Sub

Thursday, July 17, 2014

Passing Product Name as Parameter - InstallShield Basic MSI

Here is the step by step instruction for passing a product name from outside, i.e, command line. Since Product Name is a Private Property, we cannot pass this as a parameter from outside.

1.       Go to Property Manager, select ProductName Property and make Product Name property localizable by Clicking   [abc] symbol



2.       Create a new Public Property for assigning custom value.


  
3.       Create a Set Property Custom Action and Provide Proprty Name as  ProductName and Property Value as [MYPRODNAME]



  
4.       Build your msi.
5.       Install MSI by passing your custom Prod Name into the Public Property.







Wednesday, July 31, 2013

Passing parameter to command line option of setup.exe - using VB Script

1.       Installation of setup.exe in silent mode by passing arguments.

How to Run setup.exe in silent>

            strEXE = here & "\setup.exe"
commandline=""& strEXE &" /s “
retVal=wsh.Run(commandline, 1, true )

                How to pass parameters in silent mode installation

                        here = fso.GetParentFolderName(Wscript.ScriptFullName)
wsh.CurrentDirectory = here
INSTALLDIR="\"& chr(34) &"C:\TEST Folder\My Dest\"& chr(34)
REPLACETHIS="\"& chr(34) &"APPNAME_2013_V3\"& chr(34)
REPLACE2="\"& chr(34) &"APPNAME\"& chr(34)
REPLACEDESCR="\"& chr(34) &"Information\"& chr(34)
LogFile ="C:\Test\My Logs\MyTest EXE.log"

strParams = "INSTALLDIR=" & INSTALLDIR & _
                " REPLACETHIS=" & REPLACETHIS &  _
                " REPLACE2=" & REPLACE2 & _
                " REPLACEDESCR=" &REPLACEDESCR& _
                ""
strEXE = here & "\setup.exe"
commandline=""& strEXE &" /s /v""/qb /L*v \"""& LogFile &"\"" " & strParams & "" & chr(34)
retVal=wsh.Run(commandline, 1, true )

msgbox(retVal)