Pages

Friday 3 August 2012

MSi Sequence Column Values of Sequence Tables


Values for the Sequence Column of InstallUISequence, InstallExecuteSequence Tables
  • Positive number  Run the action in this sequence.
  • Zero Don’t run this action.
  • Null Don’t run this action.
  • -1 Run this action when an installation is successfully completed.
  • -2 Run this action when the user cancels during an installation.
  • -3 Run this action in case of a fatal error.
  • -4 Run this action when the installation is suspended.
  • Other negative numbers Don’t run this action.



Transitive components - MSI


Transitive components are regular components that are arranged in mutually-exclusive groups. The simplest example of a transitive component is a library that has different versions for Windows 95 and Windows NT. When you install the product, it installs either the Windows 95 or the Windows NT version, depending on the current operating system, but not both.

What are Secure Transforms


Secure transforms are simply transforms that are kept in a place where the user does not have write access. This might be the root of the location where an administrative installation of the package has been performed (Secure-at-Source transforms). It might also be a share or full path elsewhere on the network (Secure-Full-Path transforms).


You can indicate that the Installer should use secure transforms by special
characters in the TRANSFORMS property (discussed in the next section) or by setting the TransformsSecure or TransformsAtSource properties within the Installer database to 1.


When the Installer uses a secure transform, it will cache a copy of that transform locally. If the local copy becomes lost or damaged, it will restore it only from the original location.


Check if a Machine is Laptop - VBScript




dim l_objService
dim l_objEnum
dim l_boolIsLaptopNotebookOrTablet : l_boolIsLaptopNotebookOrTablet = false


set l_objService = getObject("winmgmts:root\cimv2")
set l_objEnum = l_objService.ExecQuery("select __relpath, chassisTypes from Win32_SystemEnclosure")


for each l_objChassis in l_objEnum


if IsArray(l_objChassis.ChassisTypes) then
for l_intItem = lbound(l_objChassis.ChassisTypes) to ubound(l_objChassis.ChassisTypes)
l_intType = l_objChassis.ChassisTypes(l_intItem)
if l_intType = 8 or l_intType = 9 or l_intType = 10 then
l_boolIsLaptopNotebookOrTablet = true
msgbox l_boolIsLaptopNotebookOrTablet
end if
next
end if
next


if IsObject(l_objService) then
set l_objService = nothing
end if


if l_boolIsLaptopNotebookOrTablet = true then
wscript.quit 1
else
wscript.quit 0 ' not a computer system that we are concerned about in this package
end if


Append Binary value in Registry - VBScript




const HKEY_LOCAL_MACHINE = &H80000002
strKeyPath = "SOFTWARE\Microsoft\Driver Signing"
strComputer = "."
iValues = Array(&H00,&H00,&H00,&H00)
Set oReg=GetObject( _ 
    "winmgmts:{impersonationLevel=impersonate}!\\" & _
   strComputer & "\root\default:StdRegProv")
oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath
strKeyPath = "SOFTWARE\Microsoft\Driver Signing"
BinaryValueName = "Policy"


oReg.SetBinaryValue HKEY_LOCAL_MACHINE,strKeyPath,_
    BinaryValueName,iValues
Set oReg = Nothing

Thursday 2 August 2012

Get Network Adaptor Speed - VBSCript


strComputer = "." 
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\WMI") 
Set colItems = objWMIService.ExecQuery("SELECT * FROM MSNdis_LinkSpeed",,48) 
For Each objItem in colItems 
    Wscript.Echo "InstanceName: " & objItem.InstanceName
    Wscript.Echo "NdisLinkSpeed: " & objItem.NdisLinkSpeed/10000 & " mbps"
Next


Copying a Set of Files - VBScript



Const OverwriteExisting = True
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFile "C:\FSO\*.txt" , "D:\Archive\" , OverwriteExisting

Read Registry - VBScript


Set oRegistry = GetObject("winmgmts:{impersonationLevel=impersonate}!\\./root/default:StdRegProv")
sBaseKey = "SOFTWARE\"
iRC = oRegistry.EnumKey(&H80000001, sBaseKey, arSubKeys)
For Each sKey In arSubKeys

if skey="JNJ" then
msgbox "yes"
end if
next

Check Drive Letter in Use - VBScript



Dim Wdrive
Set FileSystemObject = wscript.CreateObject("scripting.FileSystemObject")
Set Drives = FileSystemObject.Drives 'Create a drives collection

For Each DiskDrive in Drives
DriveLetter = DiskDrive.DriveLetter
If DriveLetter = W Then
Wdrive = True
wscript.echo "W Mapped"
End If
Next

Add Lines to File - VBSCript


Const ForReading = 1, ForWriting = 2, ForAppending = 8

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile("C:\oracle\ora81\network\admin\tnsnames.ora", ForReading)

Do Until objTextFile.AtEndOfStream
    strLine = objTextFile.ReadLine
    intFailure = InStr(strLine, "LINE 1")
    intFailure2 = InStr(strLine, "LINE 2")
    intfailure3 = InStr(strLine, "LINE 3")
    intfailure4 = InStr(strLine, "LINE 4")
    intfailure5 = InStr(strLine, "LINE 5")
    intfailure6 = InStr(strLine, "LINE 6")
    intfailure7 = InStr(strLine, "LINE 7")

    If intFailure > 0 or intFailure2 > 0 or intFailure3 > 0 or intFailure4 > 0 or intFailure5 > 0 or intFailure6 > 0 intFailure7 > 0 Then
        strNewText = strNewText & strLine & vbCrLf
    Else
        strOtherNewText = strOtherNewText & strLine & vbCrLf
    End If
Loop

objTextFile.Close
Set objTextFile = objFSO.OpenTextFile("C:\oracle\ora81\network\admin\tnsnames.ora", ForWriting, True)
objTextFile.Write(strOtherNewText)
objTextFile.Close

'****************************************************************************************************************

dim filesys, filetxt
Set filesys = CreateObject("Scripting.FileSystemObject")
Set filetxt = filesys.OpenTextFile("C:\oracle\ora81\network\admin\tnsnames.ora", ForAppending, True)
filetxt.WriteLine("LINE 1")
filetxt.WriteLine("LINE 2")
filetxt.WriteLine("LINE 3")
filetxt.WriteLine("LINE 4")
filetxt.WriteLine("LINE 5")
filetxt.WriteLine("LINE 6")
filetxt.WriteLine("LINE 7")
filetxt.Close

Set Shortcut Icon - VBScript


Set objShell = WScript.CreateObject("WScript.Shell")
strDesktopFld = objShell.SpecialFolders("Desktop")
Set objURLShortcut = objShell.CreateShortcut(strDesktopFld & "\blah.url")
objURLShortcut.TargetPath = "http://www.blah.com"
objURLShortcut.IconLocation "\\server\share\icon.ico
objURLShortcut.Save 

Wednesday 1 August 2012

Adding Pre-Requisite along with Setup - Installshield

In order to check and install a pre-requisite along with setup. Follow the steps:




1. Goto Application Data -> Redistributables in Installation Designer


2. Select the pre-requisite that needs to be added to setup installation.


3. Select when pre-requisite installation should happen incase if its not found.


Tuesday 31 July 2012

Creation of .PRQ Files - Installshield



This post describes creation of .PRQ files which can be added to ISM during creation of installers.


Prerequisite editor can be launched directly through "Installshield Prerequisite Editor" shortcut OR from ISM.




Pre-requisite editor launches as shown below, Unique Identifer will be displayed automatically



Under the Conditions section, specify the condition to be evaluated for the pre-requisite to run. Depending upon the condition selected Properties get changed






In "Files to Include" section, specify the pre-reqs files which are to be executed.






In "Applications to Run" section, select the application from drop down list and provide command line arguments to be used while installing the pre-req.






in "Behavior" section, choose the options which are required.






In "Dependencies" section, specify if this installation has any other pre-requisites.




Once all the inputs are provided, Go To File-> SaveAs and save the .PRQ file in desired location.

Thursday 26 July 2012

Installshield 2012 Suite - Chaining Application Installations

Installshield has introduced new feature in v2012 i.e., to chain application installations. EXEs or MSIs can be clubbed together as a suite which makes it easier to perform installation of applications which contain more than one MSI/EXE.


Steps to create a Installshield Suite:



1. Launch Installshield and select "Create a new project"


2. Select "Suite Project"

3. In Packages section, select the installer that needs to be run




4. Select the MSI that needs to be added to suite




5. Select the appropriate option in the following screen depending upon the application.




6. Once the MSI is imported into suite, all the parameters will be populated automatically as highlighted in the below snapshot:






7. In the same procedure add 2nd MSI




8. Once the sequencing of installers is completed, Go to Releases and Build the suite to generate the output




9. Output Setup.exe acts like a bootstapper which can be used to install the installers that were added inside Installshield Suite.





Add Scheduled Task to MSI - Installshield 2012 Spring Features

New Feature in Installshield 2012 Spring is creation of Scheduled Task.


Within the MSI its now possible to create a scheduled tasks which will be installed along with application and runs depending upon the schedule parameters set.


Please find detailed snapshot:





Tuesday 24 July 2012

SCCM 2007 Online Training - September 2012 Batch


AppREPACK announces in depth training on SCCM 2007 R2, Please find course contents below:

For more details please visit www.apprepack.in or contact Ajun@Apprepack.in

SCCM 2007 - Course Contents 
Why SCCM ?
Software distribution
Security updates
OS Deployment
Inventories
Baselines
Client management

Planning SCCM Infrastructure
Installing Windows Server 2008
Installing Active Directory and DNS
Installing and Configuring DHCP
Configuring WDS
Configuring Accounts
Installing and configuring IIS features
Installing and configuring SQL Server 2008
Installing and configuring WSUS 3.0 SP2
Configuring Active directory – Extending Schema
Installing SCCM 2007
Configuring client agent accounts

Hardware and Software requirements
VMware workstation based VMs with Windows Server 2008 R2 Server , Windows 7 / XP client

Configuring SCCM after install
Site Boundaries.
Client Installation Methods
Discovery Methods
Site Systems

Site System Roles
Distribution point
Reporting point
Server locator point
Branch Distribution point
Fallback status point
PXE Service point
Software update point
State Migration point
System health validator
Management point

Security Updates
WSUS integration
Update list
Deployment packages and Templates
Reports
Best Practices

Software Distribution
Package creation
Updating distribution points
Programs
Advertisements
Task sequences

Operating System Deployment
Preparing the environment for Configuration manager OSD
Installing and configuring Configuration manager PXE Service point
Preparing OS image for deployment
Preparing for bare metal OS deployment
Deploying OS image to target computer
Troubleshooting

Inventories
Hardware inventory
Software inventory
Software metering
Licensing
Reports

Desired Configuration Management
Configuring base lines , configuration Items
Isolating the resources
Reports

Client Management
Remote tools
Wake on LAN
Power management
Out of Band management