Pages

Thursday, 21 June 2012

Resolve ICE38 Error


ERROR: Component DesktopFolder installs to user profile. It must use a registry key under HKCU as its KeyPath, not a file.

Solution: In the Components Tab, find the CurrentUser component, which holds all the user's information. Pick one of the registry keys (except the one set as a keypath), right click on it and select the option 'Move'. Move that key to the component referred on the ICE error message. Go to that component, open it and find the 'new key'. Right click on the entry and select 'Set as Key' option.

Create Minor Upgrade MSI


Steps to create Minor Upgrade:

  1. Change the Package code and Product Version to create a minor upgrade
  2. Add feature / component by following the guide lines in Section: Requirement for Minor upgrade
  3. Add Remove or Modify files, registry keys and shortcuts.
  4. Add minor upgrade item in upgrades view (this is optional).
  5. Build and use the installer for upgrade.

Resolve ICE18 Error


Error: KeyPath for Component “…” is Directory “…”. The Directory is not listed in the CreateFolders table

Solution: Create a new row in the table “CreateFolder”, select the mentioned Directory and the mentioned Component.

Resolve ICE43 Error


Error: Component “…” has non-advertised shortcuts. It Should use a registry key under HKCU as its KeyPath, not a file.

Solution: Put one Current_User registry key under the mentioned component and set that registry key as the keypath

Resolve ICE57 Errors


Error: Component has both per user and per machine data with a per machine keypath

Solution: Create a new component (with a new GUID), move all of the per user data from the component that kicks up the error to the new one. Set one of the files/reg keys as it’s keypath.

Stop & Delete Service - VBScript


Option Explicit


On Error Resume Next


Dim objWshShell


Set objWshShell = CreateObject("WScript.Shell")


objWshShell.Run "sc stop ServiceName",0,true
objWshShell.Run "sc delete  ServiceName ",0,true


Set objWshShell = Nothing

Delete Files of common name - VBScript


Suppose cr123.tmp, crequ.tmp, crkkin.tmp...........etc files are present under C:\Windows folder


The following script can be used to delete cr*.tmp files from C:\Windows folder


strDir = "C:\WINDOWS"
Set fso = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("WScript.Shell")
Set objDir = FSO.GetFolder(strDir)
getInfo(objDir)
Sub getInfo(pCurrentDir)


For Each aItem In pCurrentDir.Files
If (LCase(Left(Cstr(aItem.Name), 2)) = "cr") AND fso.GetExtensionName(LCase(aItem.Name)) = "tmp" Then
aItem.delete(True)
End If
Next
For Each aItem In pCurrentDir.SubFolders
'wscript.Echo aItem.Name & " passing recursively"
getInfo(aItem)
Next
End Sub