tag:blogger.com,1999:blog-294528182024-03-12T22:46:42.421-07:00Microsoft Installer: MSIThis Blog is for all people working or related to the MSI and App-V.
There are lots of issues we face in everyday work regarding the technology. The sole purpose of my blog is to help others with whatever I learn. All you people out there, please help by commenting, voting, propagating and sharing my blog with your friends and colleagues but with due credit and acknowledgement to the material posted here with my name and blog url as I still do hold the copyright of the posts here.Piyush Nasahttp://www.blogger.com/profile/11750828958665245404noreply@blogger.comBlogger70125tag:blogger.com,1999:blog-29452818.post-17134202462208409802015-08-20T17:21:00.001-07:002015-08-20T17:21:41.836-07:00Uninstall Fonts through VBScriptI had to uninstall Helvetica and FoundersGrotesk fonts from all the machines in our environment. They had been initially been deployed through MSI a few years back when no one bothered to check if the uninstall of that MSI was actually removing the fonts. So now, since those MSI were not uninstalling the fonts from the machine, I decided to write a VBScript to delete those fonts. While I could find scripts to remove the fonts, but none of them actually helped me to remove the fonts.<br />
<br />
I wanted a script which will delete any font starting with Helvetica or FoundersGrotesk from Windows\Fonts folder and from Registry to completely remove it.<br />
<br />
You can use this script for other fonts, by replacing Helvetica with your font name and then change the length from 9 to the one of your fonts length. I have mentioned this in comments in the script where you need to change it.<br />
<br />
This script will work for both 32-bit an 64-bit machines.<br />
<br />
<br />
'Script to Delete Font<br />
'Created by: Piyush Nasa<br />
'Date: 21-8-2015<br />
const HKEY_LOCAL_MACHINE = &H80000002<br />
<br />
Dim strFolder, objFSO, objFolder, oShell, sCurDir,FileName, oFSO<br />
strFolder = "C:\Windows\Fonts"<br />
Set oShell = CreateObject("WScript.Shell")<br />
sCurDir = Left(WScript.ScriptFullName, InStrRev(WScript.ScriptFullName, "\") - 1)<br />
<br />
Set objFSO = CreateObject("Scripting.FileSystemObject")<br />
Set objFolder = objFSO.GetFolder(strFolder)<br />
<br />
strComputer = "."<br />
Set objShell = Wscript.CreateObject("Wscript.Shell")<br />
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_<br />
strComputer & "\root\default:StdRegProv")<br />
<br />
Call CleanFolder(objFolder) 'Remove Font Files<br />
<br />
'Remove Registries<br />
<br />
strKeyPath = "SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Fonts"<br />
<br />
oReg.EnumValues HKEY_LOCAL_MACHINE, strKeyPath,_<br />
arrValueNames, arrValueTypes<br />
<br />
For i=0 To UBound(arrValueNames)<br />
'Change the length and Name in the line below <br />
If (Left(arrValueNames(i), 9) = "Helvetica") Then<br />
'msgbox "Value Name: " & HKEY_LOCAL_MACHINE & "\" & strKeyPath & "\" & arrValueNames(i)<br />
objShell.RegDelete "HKEY_LOCAL_MACHINE\" & strKeyPath & "\" & arrValueNames(i)<br />
End If<br />
Next<br />
<br />
<br />
<br />
<br />
Sub CleanFolder(ByVal objParent)<br />
Dim objChild, objFile<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Set oFSO = CreateObject("Scripting.FileSystemObject")<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Set oShell = CreateObject("WScript.Shell")<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
For Each objFile In objParent.Files<br />
' Wscript.Echo " " & objFile.Name<br />
'Change the length and Name in the line below <br />
If (Left(objFile.Name, 9) = "helvetica") Then<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>FileName =objFSO.GetFileName(objFile)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>strFile = strFolder & "\" & FileName<br />
If oFSO.FileExists(strFile) Then<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>' Delete the file<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>oFSO.DeleteFile strFile, True<br />
End If<br />
End If<br />
Next<br />
For Each objChild In objParent.SubFolders<br />
Call CleanFolder(objChild)<br />
Next<br />
<br />
Set oFSO = Nothing<br />
End SubPiyush Nasahttp://www.blogger.com/profile/11750828958665245404noreply@blogger.com1tag:blogger.com,1999:blog-29452818.post-72700677585631337612015-07-01T18:45:00.001-07:002015-07-01T18:45:34.136-07:00Citrix Receiver upgrade and double icon issueI recently had to upgrade Citrix Receiver for one of my clients and I faced numerous issues during the install.<br />
I had to enable SSO for Citrix Receiver and add a storefront URL so when the users launch Citrix Receiver they should be able to launch their apps store directly without going through login prompts and entering the url.<br />
<br />
While Citrix Receiver can be installed with the following command:<br />
<br />
CitrixReceiver.exe /silent /noreboot /includeSSON ENABLE_SSON=Yes ALLOWADDSTORE=N ALLOWSAVEPWD=S<br />
<br />
And Store URL can be set in the ADM template of Citrix Receiver, however, you will need to uninstall the older version before you install the new one.<br />
<br />
Other issues faced were for double icons which appeared on those users machines who had added an app store themselves in the previous version. When a new store was added through Group policy, it actually doubled the store and the icons.<br />
The stores are created in the below registry key:<br />
HKCU\Software\Citrix\Dazzle<br />
When I removed this for the user and infact for all the users, it left behind dead icons in Start Menu, Desktop and in Citrix Receiver console. Also due to these dead icons, then I faced issues for Citrix stealing focus from all other applications.<br />
<br />
Citrix suggests to use Citrix uninstall utility, but that works only when a logged on user runs it as an administrator which is rare in our environments.<br />
<br />
I wrote following script to install, delete dead icons and remove the HKCU keys for all users of Citrix which are left behind.<br />
You will Need:<br />
1) Citrix Receiver<br />
2) Receiver Cleanup Utility<br />
to be in the same install folder as these scripts.<br />
<br />
<b><u>Script 1</u></b><br />
<br />
install.vbs<br />
<br />
'Created: Piyush Nasa<br />
'Date: 05-May-2015<br />
<br />
Dim oExplorer<br />
Dim oShell ' Windows Scripting Host shell<br />
Dim oFSO ' File system object<br />
Dim sCurDir, AppName, srd ' Script path<br />
Dim sWinDir ' Windows root path<br />
Dim scpf86, spf, strAppMsg, oEnv<br />
dim strComputer, oReg, strKeyPath, strValueName, StringVal<br />
<br />
'===========================================<br />
' Main<br />
<br />
'On Error Resume Next<br />
<br />
Set oShell = CreateObject("WScript.Shell")<br />
<br />
set oEnv = oShell.Environment("PROCESS")<br />
<br />
oEnv("SEE_MASK_NOZONECHECKS") = 1<br />
<br />
sCurDir = Left(WScript.ScriptFullName, InStrRev(WScript.ScriptFullName, "\") - 1)<br />
<br />
sWinDir = oShell.ExpandEnvironmentStrings ("%WinDir%")<br />
<br />
const HKEY_LOCAL_MACHINE = &H80000002<br />
<br />
'Check if previous version exists<br />
'--------------------------------------<br />
<br />
strComputer = "."<br />
<br />
DIM fso <br />
Set fso = CreateObject("Scripting.FileSystemObject")<br />
<br />
'Uninstall if anything left from Citrix<br />
oShell.Run sCurDir & "\ReceiverCleanupUtility.exe /silent", 1, 1<br />
<br />
'Uninstall Previous version<br />
<br />
If (fso.FileExists("C:\ProgramData\Citrix\Citrix Receiver\TrolleyExpress.exe")) Then<br />
oShell.Run chr(34) & "C:\ProgramData\Citrix\Citrix Receiver\TrolleyExpress.exe" & chr(34) & " /Uninstall /Cleanup /silent", 1, 1<br />
Else<br />
'Do Nothing<br />
End If<br />
<br />
'Uninstall if anything left from Citrix<br />
oShell.Run sCurDir & "\ReceiverCleanupUtility.exe /silent", 1, 1<br />
<br />
'Uninstall any Citrix Shortcuts left behind<br />
oShell.Run sCurDir & "\DeleteShortcuts.vbs", 1, 1<br />
<br />
'Uninstall Citrix keys in HKCU left behind<br />
oShell.Run sCurDir & "\UninstallCitrixRegs.vbs", 1, 1<br />
<br />
AppName = "Citrix Receiver 4.2.1"<br />
<br />
<br />
' Install Citrix Receiver 4.2.1<br />
oShell.Run sCurDir & "\CitrixReceiver.exe /silent /noreboot /includeSSON ENABLE_SSON=Yes ALLOWADDSTORE=N ALLOWSAVEPWD=S", 1, 1<br />
<br />
oEnv.Remove("SEE_MASK_NOZONECHECKS")<br />
<br />
<br />
'Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")<br />
<br />
'strKeyPath = "SOFTWARE\<company>\Applications\CitrixReceiver"</company><br />
<br />
'strValueName = "Installed"<br />
'StringVal = 1<br />
<br />
'oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath<br />
'oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,StringVal<br />
<br />
<br />
<b><u>Script 2.</u></b><br />
<br />
DeleteShortcuts.vbs<br />
<br />
On Error Resume Next<br />
Set objFSO = CreateObject("Scripting.FileSystemObject")<br />
Set wshShell = WScript.CreateObject("WScript.Shell")<br />
'initialize logging<br />
strLogFile = wshShell.ExpandEnvironmentStrings("%TEMP%\CitrixReceiverShortcutClean.log.txt")<br />
Set objLogFile = objFSO.OpenTextFile(strLogFile, 8, True)<br />
objLogFile.WriteLine Now & ": Logging Initialized"<br />
'get list of folders in C:\Users<br />
Set objFolder = objFSO.GetFolder("C:\Users")<br />
objLogFile.WriteLine Now & ": Got list of user folders under C:\Users"<br />
For Each UserSubFolder in objFolder.SubFolders<br />
'search the users start menu for Citrix shortcuts<br />
'msgbox UserSubFolder.Path<br />
objStartFolder = UserSubFolder.Path & "\AppData\Roaming\Microsoft\Windows\Start Menu"<br />
'msgbox objStartFolder<br />
objLogFile.WriteLine Now & ": Searching folder: " & objStartFolder<br />
Set objSearchFolder = objFSO.GetFolder(objStartFolder)<br />
Set colFiles = objSearchFolder.Files<br />
For Each objFile in colFiles<br />
If InStr(objFile.Name, ".lnk") Then<br />
IsCitrixShortcut objSearchFolder.Path & "\" & objFile.Name<br />
End If<br />
Next<br />
ShowSubfolders objFSO.GetFolder(objStartFolder)<br />
' now search the users desktop for Citrix shortcuts<br />
objStartFolder = UserSubFolder.Path & "\Desktop"<br />
objLogFile.WriteLine Now & ": Searching folder: " & objStartFolder<br />
Set objSearchFolder = objFSO.GetFolder(objStartFolder)<br />
Set colFiles = objSearchFolder.Files<br />
For Each objFile in colFiles<br />
If InStr(objFile.Name, ".lnk") Then<br />
IsCitrixShortcut objSearchFolder.Path & "\" & objFile.Name<br />
End If<br />
Next<br />
ShowSubfolders objFSO.GetFolder(objStartFolder)<br />
Next<br />
objLogFile.WriteLine Now & ": Script complete"<br />
Sub ShowSubFolders(Folder)<br />
<br />
For Each Subfolder in Folder.SubFolders<br />
Set objFolder = objFSO.GetFolder(Subfolder.Path)<br />
Set colFiles = objFolder.Files<br />
For Each objFile in colFiles<br />
<br />
If InStr(objFile.Name, ".lnk") Then<br />
<br />
IsCitrixShortcut SubFolder.Path & "\" & objFile.Name<br />
End If<br />
Next<br />
ShowSubFolders Subfolder<br />
Next<br />
End Sub<br />
<br />
Sub IsCitrixShortcut(strShortcut)<br />
'msgbox strShortcut<br />
' CreateShortcut works like a GetShortcut when the shortcut already exists!<br />
Set objShortcut2 = wshShell.CreateShortcut(strShortcut)<br />
' WScript.Echo "Target Path : " & objShortcut2.TargetPath<br />
<br />
'WScript.Echo "Full Name : " & objShortcut2.FullName<br />
'WScript.Echo "Arguments : " & objShortcut2.Arguments<br />
'WScript.Echo "Working Directory : " & objShortcut2.WorkingDirectory<br />
'WScript.Echo "Target Path : " & objShortcut2.TargetPath<br />
'WScript.Echo "Icon Location : " & objShortcut2.IconLocation<br />
'WScript.Echo "Hotkey : " & objShortcut2.Hotkey<br />
'WScript.Echo "Window Style : " & objShortcut2.WindowStyle<br />
'WScript.Echo "Description : " & objShortcut2.Description<br />
<br />
<br />
<br />
<br />
If (InStr(objShortcut2.WorkingDirectory,"Citrix") Or InStr(objShortcut2.TargetPath,"Citrix")) Then<br />
'msgbox "found citrix"<br />
objLogFile.WriteLine Now & ": Deleting PNAgent Shortcut: " & strShortcut<br />
If objFSO.FileExists (strShortcut) Then<br />
objFSO.DeleteFile strShortcut,True<br />
'msgbox "File Deleted"<br />
Else<br />
'msgbox "File not found"<br />
End If<br />
End If<br />
End Sub<br />
<br />
<br />
<b><u>Script 3</u></b><br />
UninstallCitrixRegs.vbs<br />
<br />
'On Error Resume Next<br />
<br />
Const HKEY_CURRENT_USER = &H80000001<br />
<br />
Const HKU = &H80000003<br />
<br />
strComputer = "."<br />
strKeyPath = "Software\Citrix"<br />
strKeyPath1 = "Software\Microsoft\Windows\CurrentVersion\Uninstall"<br />
sName = "SiteName" ' Change this to site in your environment from which it starts and has common string<br />
<br />
Set objRegistry = GetObject("winmgmts:\\" & _<br />
strComputer & "\root\default:StdRegProv")<br />
Set wmi = GetObject("winmgmts:\\.\root\cimv2")<br />
Set reg = GetObject("winmgmts:\\.\root\default:StdRegProv")<br />
<br />
Set profs = wmi.ExecQuery("Select SID from Win32_UserProfile where SID like 'S-1-5-21%'")<br />
For Each prof In profs<br />
key = prof.SID & "\Software\Citrix"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>DeleteSubkeys HKU, key<br />
<br />
key1 = prof.SID & "\" & strKeyPath1<br />
<br />
EnumerateKeys HKU, key1<br />
<br />
<br />
' Call reg.DeleteKey(HKU, key) 'commented out for safety<br />
Next<br />
'End If<br />
<br />
<br />
<br />
Sub DeleteSubkeys(HKU, strKeyPath)<br />
objRegistry.EnumKey HKU, strKeyPath, arrSubkeys<br />
<br />
If IsArray(arrSubkeys) Then<br />
For Each strSubkey In arrSubkeys<br />
DeleteSubkeys HKU, strKeyPath & "\" & strSubkey<br />
Next<br />
End If<br />
<br />
objRegistry.DeleteKey HKU, strKeyPath<br />
End Sub<br />
<br />
Sub EnumerateKeys(hive, key)<br />
'WScript.Echo key<br />
objRegistry.EnumKey hive, key, arrSubKeys<br />
If Not IsNull(arrSubKeys) Then<br />
For Each skey In arrSubKeys<br />
EnumerateKeys hive, key & "\" & skey<br />
t=(InStr(skey,"sName"))<br />
If (t=1) Then<br />
'MsgBox skey<br />
DeleteSubkeys hive, key & "\" & skey<br />
End If<br />
<br />
Next<br />
End If<br />
End SubPiyush Nasahttp://www.blogger.com/profile/11750828958665245404noreply@blogger.com1tag:blogger.com,1999:blog-29452818.post-24895607434272055132015-02-03T16:06:00.000-08:002015-02-05T21:35:56.217-08:00How to uninstall any version of JavaI wanted to uninstall Java from all the machines and install the latest one. There were sometimes multiple versions of Java which had to be removed. Some machines had both 32 bit and 64 bit Java versions. Here is the easiest batch script to uninstall any version of Java on the machine.
<br />
There were scripts available but they did not delete 64 bit versions of Java and some very old versions of Java. Hence I modified those scripts to meet my need.<br />
<br />
set mycmd=reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall /s /f *java*
for /f " usebackq delims={} tokens=2" %%i IN (`%mycmd%`) do (
msiexec /uninstall {%%i} /passive
)<br />
set mycmd=reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall /s /f *java*
for /f " usebackq delims={} tokens=2" %%i IN (`%mycmd%`) do (
msiexec /uninstall {%%i} /passive
)Piyush Nasahttp://www.blogger.com/profile/11750828958665245404noreply@blogger.com4tag:blogger.com,1999:blog-29452818.post-717362561959309662014-05-18T18:01:00.001-07:002023-03-29T05:11:29.800-07:00VBScript to change the proxy settings if disconnected from VPNWhen connected to VPN, user's IE proxy settings get changed and is forced by VPN.<br />
Often the users might get disconnected from VPN while working from home and this does not revert back the proxy settings to the original one.<br />
I have written a VBScript to change the proxy settings of the users. This script can be made a shortcut and then used.<br />
<br />
'Script Created by Piyush Nasa<br />
'Script to change Proxy settings for user if disconnected from VPN<br />
<br />
Option Explicit<br />
Dim valUserIn<br />
Dim objShell, RegLocate, RegLocate1<br />
Set objShell = WScript.CreateObject("WScript.Shell")<br />
On Error Resume Next<br />
valUserIn = MsgBox("If you have been disconnected from VPN and want to reset your proxy, click Yes and restart Internet Explorer",4,"Proxy Reset")<br />
If valUserIn=vbYes Then<br />
RegLocate = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer"<br />
objShell.RegWrite RegLocate,"","REG_SZ"<br />
RegLocate = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable"<br />
objShell.RegWrite RegLocate,"0","REG_DWORD"<br />
<br />
'Enable AutoDetect in the proxy by calling this sub<br />
IEautomaticallydetect<br />
<br />
MsgBox "Proxy is reset to AutoDetect"<br />
<br />
else<br />
'I do not want any proxy so I have disabled this, but if you want to set a proxy then you can use this.<br />
<br />
'RegLocate = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer"<br />
'objShell.RegWrite RegLocate,"xxxx.xxx.com:80","REG_SZ"<br />
'RegLocate = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable"<br />
'objShell.RegWrite RegLocate,"1","REG_DWORD"<br />
MsgBox "Your Proxy is not changed."<br />
End If<br />
WScript.Quit<br />
<br />
<br />
<br />
SUB IEautomaticallydetect<br />
<br />
<br />
DIM sKey,sValue,binaryVal<br />
Dim oReg<br />
Set oReg=GetObject( "winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv") 'For registry operations througout<br />
<br />
Const HKCU=&H80000001<br />
<br />
sKey = "Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections"<br />
sValue = "DefaultConnectionSettings"<br />
<br />
oReg.GetBinaryValue HKCU, sKey, sValue, binaryVal<br />
<br />
'you can keep different values of this binary to have different options. 9 is just for Auto detect enable.<br />
binaryVal(8) = 9<br />
<br />
oReg.SetBinaryValue HKCU, sKey, sValue, binaryVal<br />
end subPiyush Nasahttp://www.blogger.com/profile/11750828958665245404noreply@blogger.com0tag:blogger.com,1999:blog-29452818.post-65970658196159329792013-05-15T18:40:00.000-07:002015-01-14T23:09:48.417-08:00Packaging Skype with Auto Update disabledEDITED: I have edited this post on 30-Aug-2013 after some users comments that the given solution is not working. I have studied in depth the skype update process and created this solution for all. Please check below (Edited Section) for more information.<br />
<br />
Recently while packaging Skype for enterprise version, I could not disable the Auto Updates and finally found a way to get rid of it.<br />
<div>
<br /></div>
<div>
You can get the latest version of Skype setup in MSI format from the following URL: <a href="http://download.skype.com/msi/SkypeSetup.msi"><span style="font-family: inherit;">http://download.skype.com/msi/SkypeSetup.msi</span></a> or<br />
<span style="font-family": inherit;"><a href="http://www.skype.com/go/getskype-msi">http://www.skype.com/go/getskype-msi</a></span><br />
<br /></div>
<div>
<br /></div>
<div>
There is no registry, file which can disable the Auto Update functionality of Skype. I searched in lots of forums and all said that it automatically prompts for update. So finally I decided to look in the MSI and find why and how it is doing it.</div>
<div>
<br /></div>
<div>
What I found was that Skype has an Updater.exe in the installation folder and it also creates a Skype Update service which points to this exe.</div>
<div>
I just removed this service and updater.exe file from the skype msi package and it worked.</div>
<div>
No need to do anything else. Just do this small part and you are done with removing the Auto Update in Skype.<br />
<br />
<span style="color: red;"><b>Edited:</b></span><br />
I have been asked and told by a lot of users that this is not working so I am adding a further solution which will definitely work without a doubt. I have mass deployed this and it has worked fine. For all the users who were getting the pop ups, this has fixed it.<br />
<br />
You need to create a dummy SetupSkype.exe file and a Skypefix.vbs as below and add it to your INSTALLDIR (C:\Program Files\Skype\Phone\) of the package.<br />
<br />
SkypeFix.vbs:<br />
'==============================================<br />
dim filesys, oShell<br />
Set filesys = CreateObject("Scripting.FileSystemObject")<br />
Set oShell = CreateObject("WScript.Shell")<br />
<br />
des1 = oShell.ExpandEnvironmentStrings ("%Temp%")<br />
sup = oShell.ExpandEnvironmentStrings ("%ProgramFiles%")<br />
windir = oShell.ExpandEnvironmentStrings ("%Windir%")<br />
<br />
destfile1= des1 & "\SkypeSetup.exe"<br />
sourcefile1= sup & "\Skype\Phone\SkypeSetup.exe"<br />
<br />
'Copy files<br />
<br />
If filesys.FileExists(sourcefile1) Then<br />
<br />
a= filesys.CopyFile (sourcefile1, destfile1,True)<br />
<br />
End If<br />
<br />
oShell.Run windir & "\System32\Icacls.exe " & destfile1 & " /deny Everyone:D"<br />
<br />
'=================================================<br />
<br />
After this you need to create an Active Setup registry key which will run this vbs file for every user who logs off and logs in. After this there will be no upgrade issue.<br />
<br />
This script works on the fact that SkypeSetup.exe gets downloaded from internet to %temp% folder of user and when it is downloaded, it starts prompting up for upgrade. I have created this file before hand in %temp% folder or replace the already existing one with this dummy file and then put a deny restriction to all the users on this file. So now a file cannot be downloaded to %temp% folder because there is already a file which cannot be deleted/replaced. Hence no more upgrade prompts.<br />
I have created this solution by deeper understanding of Skype setup and upgrade.<br />
<br /></div>
<div>
Hope this tip will be helpful to you and let me know if it still does not work.</div>
<div>
<br /></div>
Piyush Nasahttp://www.blogger.com/profile/11750828958665245404noreply@blogger.com8tag:blogger.com,1999:blog-29452818.post-88243233980067152342013-04-16T21:52:00.002-07:002013-07-07T21:37:26.701-07:00How to clear App-V CacheThis has become my favorite site today because one of the issue which I was facing in App-V while testing was because the App-V cache was not getting cleared.<br />
I used one of the method used here and it worked for me.<br />
I want to share this link with all and want to bookmark it for myself for future reference.<br />
<br />
<a href="http://esense.be/33/2010/04/15/softgrid-clear-the-appv-cache/">http://esense.be/33/2010/04/15/softgrid-clear-the-appv-cache/</a><br />
<br />
<br />
In Summary, these are a few good options to start with:<br />
<br />
<br />
<div style="background-color: white; border: 0px; color: #373737; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;">
First, get a list of all AppV applications:</div>
<blockquote style="background-color: white; border: 0px; color: #373737; font-family: Georgia, 'Bitstream Charter', serif; font-size: 15px; font-style: italic; line-height: 24px; margin: 0px 3em; outline: 0px; padding: 0px; quotes: ''; vertical-align: baseline;">
<div style="border: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;">
sftmime query obj:app /short</div>
</blockquote>
<div style="background-color: white; border: 0px; color: #373737; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;">
Remove all applications from the cache:</div>
<blockquote style="background-color: white; border: 0px; color: #373737; font-family: Georgia, 'Bitstream Charter', serif; font-size: 15px; font-style: italic; line-height: 24px; margin: 0px 3em; outline: 0px; padding: 0px; quotes: ''; vertical-align: baseline;">
<div style="border: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;">
sftmime.exe remove obj:app /global /complete</div>
</blockquote>
<div style="background-color: white; border: 0px; color: #373737; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;">
Remove a specific application from the cache:</div>
<blockquote style="background-color: white; border: 0px; color: #373737; font-family: Georgia, 'Bitstream Charter', serif; font-size: 15px; font-style: italic; line-height: 24px; margin: 0px 3em; outline: 0px; padding: 0px; quotes: ''; vertical-align: baseline;">
<div style="border: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;">
sftmime.exe remove app:”applicationName” /complete</div>
</blockquote>
<br />
<br />
Hope your issues are solved with this as well.<br />
<br />Piyush Nasahttp://www.blogger.com/profile/11750828958665245404noreply@blogger.com1tag:blogger.com,1999:blog-29452818.post-29640638871660198852013-03-17T23:07:00.000-07:002013-03-17T23:08:08.774-07:00App-V with Java/JRE/JDKIt is very critical to understand how to handle installation of Java related applications in App-V environment.<br />
While some are of the view that the application should be installed along with Java in the same bubble while some say that the Java version installed on the base machine can be used.<br />
<br />
Here is how you can do both of these in a proper way:<br />
<br />
1) <b><u>Java installed locally on the machine:</u></b> If Java is locally installed on the machine and you capture the App-V application, then you will see a hard coded entry in the registry. This basically points the App-V application to look for Java in this local machine location. If you upgrade your Java version from say 1.6.21 to 1.6.24, then you do not need to worry, however, if you do a major upgrade from 1.6.21 to 1.7.xx then you need to upgrade your App-V Application as well. You need to maintain the software library for all these applications and then upgrade them as part of Java Upgrade in the organization.<br />
<br />
2) <b><u>Java is installed as local copy inside App-V bubble:</u></b> Java can also be installed as a local copy with your App-V application. There can be various reasons for doing this:<br />
a) Application is compatible only with a certain version of Java<br />
b) Application uses a higher version which is not locally installed.<br />
c) If Software manager do not want to upgrade the application every time Java gets updated.<br />
<br />
In these cases a private copy of Java can be captured with App-V. However, there is a procedure for achieving this.<br />
These steps will be helpful in doing this:<br />
<br />
<a href="http://packagingguide.blogspot.com.au/2011/11/app-v-for-java-runtime-environment.html" target="_blank">http://packagingguide.blogspot.com.au/2011/11/app-v-for-java-runtime-environment.html</a><br />
<br />Piyush Nasahttp://www.blogger.com/profile/11750828958665245404noreply@blogger.com0tag:blogger.com,1999:blog-29452818.post-77108649734531013832013-02-25T15:25:00.000-08:002013-02-25T15:25:52.883-08:00Detection Method for MSU in Applications for SCCM 2012In SCCM 2012 Applications you can have a detection method set for MSU with KB numbers.<br />
<br />
You can use the Powershell or VBScript to do this. Here is an example of both.<br />
<br />
<b><u>Powershell Script:</u></b><br />
<br />
get-hotfix | Where-Object {$_.HotFixID -match "KB981603"}<br />
<br />
<b><u>VBScript:</u></b><br />
<br />
'Returns info if Windows 'KB981603' in installed<br />
' ----------------------------------------------------------'<br />
Option Explicit<br />
<br />
Dim objWMIService, strComputer<br />
strComputer = "."<br />
<br />
'Run the query<br />
Set objWMIService = GetObject("winmgmts:" _<br />
& "{impersonationLevel=impersonate}!\\" _<br />
& strComputer & "\root\cimv2")<br />
<br />
Dim QFEs<br />
Dim QFE<br />
Set QFEs = objWMIService.ExecQuery ("Select * from win32_QuickFixEngineering where HotFixID like 'KB981603'")<br />
For Each QFE in QFEs<br />
Wscript.echo "Update KB981603 was installed by " & QFE.InstalledBy & " on " & QFE.InstalledOn<br />
Next<br />
WScript.QuitPiyush Nasahttp://www.blogger.com/profile/11750828958665245404noreply@blogger.com0tag:blogger.com,1999:blog-29452818.post-39752587284852209442013-02-14T14:50:00.000-08:002013-02-14T14:53:49.088-08:00VBScript to Delete Registrly key and all subkeys<br />
This script has worked good for me and I would like to share with all.<br />
<br />
Option Explicit<br />
<br />
Dim intHive<br />
Dim strComputer<br />
Dim strKeyPath, objRegistry<br />
<br />
Const HKEY_CLASSES_ROOT = &H80000000<br />
Const HKEY_CURRENT_USER = &H80000001<br />
Const HKEY_LOCAL_MACHINE = &H80000002<br />
Const HKEY_USERS = &H80000003<br />
Const HKEY_CURRENT_CONFIG = &H80000005<br />
<br />
'On Error Resume Next<br />
<br />
strComputer = "."<br />
intHive = HKEY_LOCAL_MACHINE<br />
<br />
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ABC\XYZ"<br />
<br />
Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")<br />
<br />
DelSubkeys intHive, strKeypath<br />
<br />
Set objRegistry = Nothing<br />
<br />
Sub DelSubkeys(ByVal intRegistryHive, ByVal strRegistryKey)<br />
Dim arrSubkeys<br />
<br />
objRegistry.EnumKey intRegistryHive, strRegistryKey, arrSubkeys<br />
If IsArray(arrSubkeys) Then<br />
For Each strSubkey In arrSubkeys<br />
DelSubkeys intRegistryHive, strRegistryKey & "\" & strSubkey<br />
Next<br />
End If<br />
<br />
objRegistry.DeleteKey intRegistryHive, strRegistryKey<br />
End SubPiyush Nasahttp://www.blogger.com/profile/11750828958665245404noreply@blogger.com0tag:blogger.com,1999:blog-29452818.post-57156872942393395702013-01-30T19:34:00.002-08:002013-01-30T19:38:04.741-08:00VBScript to Delete Folder and all SubFolders with files<br />
<div style="margin-bottom: .0001pt; margin: 0cm;">
Here is the VBScript which will delete all Folders and Subfolders
with even have files in it.<o:p></o:p></div>
<div style="margin: 0cm 0cm 0.0001pt;">
It took me so many
hours to find this perfect script and all credits go to Rob van der Woude and
the original script is here: http://www.robvanderwoude.com/vbstech_folders_deltree.php<br />
I just want to keep this for my reference and for everyone so that we all can
save some time.<o:p></o:p></div>
<div style="margin: 0cm 0cm 0.0001pt;">
<br /></div>
<div style="margin: 0cm 0cm 0.0001pt;">
<br />
<div style="margin-bottom: .0001pt; margin: 0cm;">
<span style="background: white; color: #005900; font-family: "Arial","sans-serif"; font-size: 10.0pt;">Option
Explicit<br />
<br />
Dim objFSO, objTempFolder, strTempFolder<br />
<br />
Const TEMP_FOLDER = 2<br />
<br />
Set objFSO = CreateObject(
"Scripting.FileSystemObject" )<br />
Set objTempFolder = objFSO.GetSpecialFolder( TEMP_FOLDER )<br />
strTempFolder = objTempFolder.Path<br />
<br />
DelTree strTempFolder, True<br />
<br />
<br />
Sub DelTree( myFolder, blnKeepRoot )<br />
' With this subroutine you can delete folders and their content,<br />
' including subfolders.<br />
' You can specify if you only want to empty the folder, and thus<br />
' keep the folder itself, or to delete the folder itself as well.<br />
' Root directories and some (not all) vital system folders are<br />
' protected: if you try to delete them you'll get a message that<br />
' deleting these folders is not allowed.<br />
'<br />
' Arguments:<br />
' myFolder [string] the folder to be
emptied or deleted<br />
' blnKeepRoot [boolean] if True, the folder is emptied
only,<br />
'
otherwise it will be deleted itself too<br />
'<br />
' Written by Rob van der Woude<br />
' http://www.robvanderwoude.com<br />
'<br />
Dim arrSpecialFolders(3)<br />
Dim objMyFSO, objMyFile, objMyFolder, objMyShell<br />
Dim objPrgFolder, objPrgFolderItem, objSubFolder,
wshMyShell<br />
Dim strPath, strSpecialFolder<br />
<br />
Const WINDOWS_FOLDER = 0<br />
Const SYSTEM_FOLDER = 1<br />
Const PROGRAM_FILES = 38<br />
<br />
' Use custom error handling<br />
On Error Resume Next<br />
<br />
' List the paths of system folders that should NOT be
deleted<br />
Set wshMyShell =
CreateObject( "WScript.Shell" )<br />
Set
objMyFSO = CreateObject(
"Scripting.FileSystemObject" )<br />
Set objMyShell =
CreateObject( "Shell.Application" )<br />
Set objPrgFolder =
objMyShell.Namespace( PROGRAM_FILES )<br />
Set objPrgFolderItem = objPrgFolder.Self<br />
<br />
arrSpecialFolders(0) = wshMyShell.SpecialFolders(
"MyDocuments" )<br />
arrSpecialFolders(1) = objPrgFolderItem.Path<br />
arrSpecialFolders(2) = objMyFSO.GetSpecialFolder(
SYSTEM_FOLDER ).Path<br />
arrSpecialFolders(3) = objMyFSO.GetSpecialFolder(
WINDOWS_FOLDER ).Path<br />
<br />
Set objPrgFolderItem = Nothing<br />
Set objPrgFolder = Nothing<br />
Set objMyShell =
Nothing<br />
Set wshMyShell =
Nothing<br />
<br />
' Check if a valid folder was specified<br />
If Not objMyFSO.FolderExists( myFolder ) Then<br />
WScript.Echo "Error: path
not found (" & myFolder & ")"<br />
WScript.Quit 1<br />
End If<br />
Set objMyFolder = objMyFSO.GetFolder( myFolder )<br />
<br />
' Protect vital system folders and root directories
from being deleted<br />
For Each strSpecialFolder In arrSpecialFolders<br />
If UCase( strSpecialFolder ) =
UCase( objMyFolder.Path ) Then<br />
WScript.Echo
"Error: deleting """ _<br />
& objMyFolder.Path & """ is not allowed"<br />
WScript.Quit
1<br />
End If<br />
Next<br />
<br />
' Protect root directories from being deleted<br />
If Len( objMyFolder.Path ) < 4 Then<br />
WScript.Echo "Error:
deleting root directories is not allowed"<br />
WScript.Quit 1<br />
End If<br />
<br />
' First delete the files in the directory specified<br />
For Each objMyFile In objMyFolder.Files<br />
strPath = objMyFile.Path<br />
objMyFSO.DeleteFile strPath,
True<br />
If Err Then<br />
WScript.Echo
"Error # " & Err.Number & vbCrLf _<br />
& Err.Description &
vbCrLf _<br />
& "(" & strPath & ")"
& vbCrLf<br />
End If<br />
Next<br />
<br />
' Next recurse through the subfolders<br />
For Each objSubFolder In objMyFolder.SubFolders<br />
DelTree objSubFolder, False<br />
Next<br />
<br />
' Finally, remove the "root" directory unless
it should be preserved<br />
If Not blnKeepRoot Then<br />
strPath = objMyFolder.Path<br />
objMyFSO.DeleteFolder strPath,
True<br />
If Err Then<br />
WScript.Echo
"Error # " & Err.Number & vbCrLf _<br />
& Err.Description &
vbCrLf _<br />
& "(" & strPath & ")"
& vbCrLf<br />
End If<br />
End If<br />
<br />
' Cleaning up the mess<br />
On Error Goto 0<br />
Set objMyFolder = Nothing<br />
Set objMyFSO = Nothing<br />
End Sub</span><span style="font-family: Arial, sans-serif; font-size: 13.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
</div>
Piyush Nasahttp://www.blogger.com/profile/11750828958665245404noreply@blogger.com4tag:blogger.com,1999:blog-29452818.post-6183604275404350612012-12-13T20:25:00.000-08:002012-12-13T20:25:04.913-08:00Permissions to registry using setaclRecently I was trying giving permission to one of the registry hives with Subinacl, but it was not working despite all efforts and checking all the syntax and a lot of troubeshooting.<br />
<br />
Then I came across another permission granting utility known as SetACL. It worked like a charm. So you can try using this utility is Subinacl fails.<br />
<br />
You can download SetACL from <a href="http://helgeklein.com/download/">http://helgeklein.com/download/</a><br />
<br />
Here is an example to run SetACL to give registry permissions.<br />
<br />
"SetACL.exe" -on "hkcr\Interface" -ot reg -actn setowner -ownr "n:Administrators"<br />
"SetACL.exe" -on "hkcr\Interface" -ot reg -actn ace -ace "n:Users;p:full"<br />
<br />
<br />
<ul style="background-color: white; border: 0px; font-family: Arial, sans-serif; font-size: 14px; line-height: 21px; list-style: none; margin: 0.5em 0px 1.5em; outline: 0px; padding: 0px 0px 0px 30px; vertical-align: baseline;">
<li style="background-color: transparent; border: 0px; list-style-type: disc; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><strong style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Object name (-on)</strong>: This is the path to the object SetACL should operate on (file/directory/registry key/network share/service/printer).</li>
<li style="background-color: transparent; border: 0px; list-style-type: disc; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><strong style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Object type (-ot)</strong>: What kind of object does the object name refer to: file or directory (file), registry key (reg), service (srv), printer (prn), network share (shr)?</li>
<li style="background-color: transparent; border: 0px; list-style-type: disc; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><strong style="background-color: transparent; border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Action (-actn)</strong>: What should SetACL do with the object specified?</li>
</ul>
<br />
A lot more details and description can be found at this awesome site: <a href="http://helgeklein.com/setacl/documentation/command-line-version-setacl-exe/">http://helgeklein.com/setacl/documentation/command-line-version-setacl-exe/</a><br />
<br />
<br />Piyush Nasahttp://www.blogger.com/profile/11750828958665245404noreply@blogger.com3tag:blogger.com,1999:blog-29452818.post-78657025591297404422012-10-23T15:54:00.000-07:002012-10-23T15:54:02.398-07:00Install MSP file with MSIWhile handling with MSP of applications, sometimes a question comes in mind that can an MSP be installed along with MSI?<br />
The answer is yes, but with a few conditions involved.<br />
The conditions are explained later in the post with some description.<br />
<br />
First I will give you the command line to install MSP along with MSI:<br />
<br />
msiexec /i {Path to MSI}\Installer.MSI PATCH={Path to MSP}\Patch.MSP /qb<br />
<br />
If there is a transform as well to add you can include it in the command line as well.<br />
<br />
msiexec /i {Path to MSI}\Installer.MSI TRANSFORMS={Path to Transform}\Transform.MST PATCH={Path to MSP}\Patch.MSP /qb<br />
<br />
The only thing which you have to take care in the command line is that you will have to give a complete path to MSP.<br />
Relative paths do not work in this case.<br />
<br />
This will apply the patch as in the updated files will be installed from the patch rather than from the MSI. <br />
<br />
This process is greatly useful when there are a lot of patches to be applied to an MSI. <br />
<br />
There might be cases that the MSI is already deployed on your client machines and you need to patch it with this new patch which has come now. You can deploy the MSP over the MSI and then it is suggested to change the initial MSI package to include the MSP.<br />
<br />
If you have multiple MSP for an MSI then the way you implement it actually depends on the way the MSP are created for the MSI. There are two kinds of MSP:<br />
1) Incremental<br />
2) Add-on<br />
<br />
The above ones are my terms and not Microsoft's and I am using them just for explaination purpose.<br />
<br />
In Incremental MSP, say version 1.2 contains all the content for version 1.1 and so can be installed directly on top of MSI which is version 1.0. Similarly version 1.3 will install directly on top of MSI version 1.0. So you can skip the previous MSP version and directly install the latest version on top of your MSI.<br />
<br />
In Add-on MSP, the MSP has only additional data from the previous version of MSI or MSP. For example, say version 1.2 has a few files added but it does not contain the files/registries which were added or modified in version 1.1 of MSP. So in this case you will have to install both MSPs, version 1.1 and 1.2 one after the other on top of MSI version 1.0<br />
You can use command line like this:<br />
msiexec /i {Path to MSI}\Package_1.0.MSI PATCH={Path to MSP}\Patch_1.1.MSP; {Path to MSP}\Patch_1.2.MSP /qb<br />
<br />
The order of MSP mentioned here is important as it will install in that particular order only.<br />
<br />
I hope this article is helpful to you in organizing and maintaining your Operational work with Application Packaging.Piyush Nasahttp://www.blogger.com/profile/11750828958665245404noreply@blogger.com2tag:blogger.com,1999:blog-29452818.post-37991911681572093402012-09-26T21:46:00.000-07:002012-09-26T21:47:55.356-07:00Error installing MSI from USB/DVD <span style="font-family: inherit;"></span><br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: inherit;">I faced an issue installing Flash player from USB drive
though it was installing fine when installed from local or network drive. I
found out the issue and resolution and want to document here for all of you.<o:p></o:p></span></div>
<span style="font-family: inherit;"></span><br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: inherit;">While installing the package, I got this error in the log
files:<o:p></o:p></span></div>
<span style="font-family: inherit;"></span><br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<o:p><span style="font-family: inherit;"> </span></o:p></div>
<span style="font-family: inherit;"></span><br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: inherit;">MSI (s) (44:C4) [14:06:35:318]: Source is incorrect. Volume
label should be<span style="mso-spacerun: yes;"> </span>but is SMSBOOT.<o:p></o:p></span></div>
<span style="font-family: inherit;"></span><br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: inherit;">MSI (s) (44:C4) [14:06:46:956]: Source is incorrect. Volume
label should be<span style="mso-spacerun: yes;"> </span>but is SMSBOOT.<o:p></o:p></span></div>
<span style="font-family: inherit;"></span><br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<o:p><span style="font-family: inherit;"> </span></o:p></div>
<span style="font-family: inherit;"></span><br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: inherit;">While analysing this, I realized that the disk label for my
USB is SMSBOOT and this could be anything else for you on your USB or DVD.<o:p></o:p></span></div>
<span style="font-family: inherit;"></span><br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: inherit;">I had added a file in my MSI through MST and it had created
an entry in the Media table. This entry looked like this and this is the
default entry which you get with the tool.<o:p></o:p></span></div>
<span style="font-family: inherit;"></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVJ1OlWZLbLbQnU_Lbc44A-AF_66VuxCXsl-zByO-Q3eLZpJWotx7boPHMUXaRLqgTnIgLlx-SYLMfWdNXsLF6M6ipxsLtjdoF5wpaa0iU6s4MAsPA5G2YE_XSKCuiJP5rseubgw/s1600/Dev1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: inherit;"><img border="0" height="59" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVJ1OlWZLbLbQnU_Lbc44A-AF_66VuxCXsl-zByO-Q3eLZpJWotx7boPHMUXaRLqgTnIgLlx-SYLMfWdNXsLF6M6ipxsLtjdoF5wpaa0iU6s4MAsPA5G2YE_XSKCuiJP5rseubgw/s320/Dev1.png" width="320" /></span></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: inherit;"> </span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="font-family: inherit;"> </span></div>
<span style="font-family: inherit;"></span><br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: inherit;">Behind the scene it was looking for a Blank labelled disk
where this media is located but could not find it and it gave an error “Insert
Disk”.<o:p></o:p></span></div>
<span style="font-family: inherit;"></span><br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: inherit;">I removed the label from my USB drive and kept it Blank. It
worked fine.<o:p></o:p></span></div>
<span style="font-family: inherit;"></span><br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: inherit;">Just to get this you can do the following in your packages
so that this issue does not come.<o:p></o:p></span></div>
<span style="font-family: inherit;"></span><br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: inherit;">Just add DISK1 in the VolumeLabel Column for your added
media as well. This will make it work for any labelled USB or DVD drive.</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKYIb9PoUQriiM-66_uzQfqrFDSuFS6EcvWHU0w1j6GaSrggB-gg9gYu8fcTYz4V2rUqsfJecOOTXiGscBzvHdxnDUvoooD33EXU0VFweM3e3WzTqE7ObH2LSm8JFD9vDwfy7UHg/s1600/Dev2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: inherit;"><img border="0" height="65" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKYIb9PoUQriiM-66_uzQfqrFDSuFS6EcvWHU0w1j6GaSrggB-gg9gYu8fcTYz4V2rUqsfJecOOTXiGscBzvHdxnDUvoooD33EXU0VFweM3e3WzTqE7ObH2LSm8JFD9vDwfy7UHg/s320/Dev2.png" width="320" /></span></a></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: inherit;"> </span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<o:p></o:p><span style="font-family: inherit;"> </span></div>
<span style="font-family: inherit;"></span><br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: inherit;">I hope this will help you to resolve your issues.<o:p></o:p></span></div>
Piyush Nasahttp://www.blogger.com/profile/11750828958665245404noreply@blogger.com2tag:blogger.com,1999:blog-29452818.post-498554493337611312012-08-07T16:30:00.000-07:002012-08-07T16:33:34.272-07:00Subinacl to give permissions to registry/FilesSubinacl is a useful utility to give permissions to registries.<br />
<br />
Here is a simple example how to give permissions to registry.<br />
<br />
subinacl.exe /subkeyreg HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Optika /grant=administrators=f /grant=system=f /grant=users=f /setowner=administrators >> %temp%\subinacl_output.txt<br />
/keyreg HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Optika /grant=administrators=f /grant=system=f /grant=users=f /setowner=administrators >> %temp%\subinacl_output.txt<br />
<br />
Subinacl can be downloaded from net.<br />
<br />
More detailed Usage as per your requirements. This contains lots of features.<br />
You can write your comments on what you used and if it worked. Help others by posting your real time examples.<br />
<br />
Usage :<br />
SubInAcl [/option...] /object_type object_name [[/action[=parameter]...]<br />
<br />
<br />
<br />
/options :<br />
/outputlog=FileName /errorlog=FileName<br />
/noverbose /verbose (default)<br />
/notestmode (default) /testmode<br />
/alternatesamserver=SamServer /offlinesam=FileName<br />
/stringreplaceonoutput=string1=string2<br />
/expandenvironmentsymbols (default) /noexpandenvironmentsymbols<br />
/statistic (default) /nostatistic<br />
/dumpcachedsids=FileName /separator=character<br />
/applyonly=[dacl,sacl,owner,group]<br />
/nocrossreparsepoint (default) /crossreparsepoint<br />
<br />
/object_type :<br />
/service /keyreg /subkeyreg<br />
/file /subdirectories[=directoriesonly|filesonly]<br />
/clustershare /kernelobject /metabase<br />
/printer /onlyfile /process<br />
/share /samobject<br />
<br />
/action :<br />
/display[=dacl|sacl|owner|primarygroup|sdsize|sddl] (default)<br />
/setowner=owner<br />
/replace=[DomainName\]OldAccount=[DomainName\]New_Account<br />
/accountmigration=[DomainName\]OldAccount=[DomainName\]New_Account<br />
/changedomain=OldDomainName=NewDomainName[=MappingFile[=Both]]<br />
/migratetodomain=SourceDomain=DestDomain=[MappingFile[=Both]]<br />
/findsid=[DomainName\]Account[=stop|continue]<br />
/suppresssid=[DomainName\]Account<br />
/confirm<br />
/ifchangecontinue<br />
/cleandeletedsidsfrom=DomainName[=dacl|sacl|owner|primarygroup|all]<br />
/testmode<br />
/accesscheck=[DomainName\]Username<br />
/setprimarygroup=[DomainName\]Group<br />
/grant=[DomainName\]Username[=Access]<br />
/deny=[DomainName\]Username[=Access]<br />
/sgrant=[DomainName\]Username[=Access]<br />
/sdeny=[DomainName\]Username[=Access]<br />
/sallowdeny==[DomainName\]Username[=Access]<br />
/revoke=[DomainName\]Username<br />
/perm<br />
/audit<br />
/compactsecuritydescriptor<br />
/pathexclude=pattern<br />
/objectexclude=pattern<br />
/sddl=sddl_string<br />
/objectcopysecurity=object_path<br />
/pathcopysecurity=path_container<br />
<br />
Usage : SubInAcl [/option...] /playfile file_name<br />
<br />
Usage : SubInAcl /help [keyword]<br />
SubInAcl /help /full<br />
keyword can be :<br />
features usage syntax sids view_mode test_mode object_type<br />
domain_migration server_migration substitution_features editing_features<br />
- or -<br />
any [/option] [/action] [/object_type]<br />
<br />
<br />
SYNTAX<br />
------<br />
<br />
describe SubInAcl syntax<br />
<br />
The SubInAcl syntax is analog to the UNIX find tool.<br />
For each object, SubInAcl :<br />
1. retrieves the security descriptor of the object<br />
2. applies the /action(s). The /actions are executed in the order of<br />
the command line<br />
3. If :<br />
- the security descriptor has been modified and<br />
- the /testmode switch has not been specified<br />
the changes are applied to the object<br />
For instance :<br />
- SubInAcl /outputlog=result.txt /subdirectories \\Server\c$\temp\*.*<br />
/grant=Dom\John=F /noverbose /display<br />
For each file below \\Server\c$\temp, SubInAcl will<br />
- open the file<br />
- grant full control for dom\john<br />
- display the security setting in noverbose mode<br />
- save the security descriptor.<br />
All outputs will be saved in result.txt<br />
<br />
You can specify as many /actions as you wish. You must specify at least 3<br />
characters for each action.<br />
The command line is not case-sensitive<br />
<br />
Ex: SubInAcl /file c:\temp\*.txt /replace=John=Smith /display<br />
for each *.txt file will - replace John with Smith<br />
- display the whole security descriptor<br />
- apply the changes if any<br />
<br />
SubInAcl error messages are sent to the Standard error.<br />
You can use the /output switch to save both outputs<br />
and errors in the same file.<br />
<br />
<br />
FEATURES<br />
--------<br />
<br />
describes SubInAcl main features<br />
SubInAcl was designed to help administrators to manage security on<br />
various objects.<br />
It provides :<br />
- a unified way to manipulate security for different kinds of objects<br />
(files, registry keys, services, printer,...)<br />
- a console tool that allows to write scripts to automate<br />
security tasks<br />
- some features that help administrators to modify security if some<br />
changes occur in their organization:<br />
- user, group deletions (/suppresssid, /cleandeletedsidsfrom )<br />
- user, group migrations (/replace , /accountmigration) <br />
- domain, server migration (/changedomain, /migratetodomain) <br />
...<br />
- security descriptor editing features :<br />
- owner ( /setowner )<br />
- primary group ( /setprimarygroup )<br />
- permissions ( /grant , /deny , /revoke )<br />
- audit ( /sgrant, /sdeny, /sallowdeny)<br />
- access to remote objects<br />
- save and restore permissions (/playfile , /outputlog , /display )<br />
<br />
You need SeBackupPrivilege SeRestorePrivilege<br />
SeSecurityPrivilege SeTakeOwnershipPrivilege <br />
SeChangeNotifyPrivilege privileges (locally or remotely) to run this tool<br />
<br />
Type SubInAcl /help to get extended help<br />
<br />
<br />
<br />
<br />
SIDS<br />
----<br />
<br />
sids : explain how SubInAcl retrieves and translates SIDs<br />
<br />
The security descriptor references users and groupswith a SID (Security<br />
Identifier). A SID can be expressed in one of the following form:<br />
+ DomainName\Account (ex: DOM\Administrators )<br />
+ StandaloneServer\Group<br />
+ Account ( see LookupAccount API )<br />
+ s-1-x-x-x-x . x is expressed in decimal<br />
(ex: S-1-5-21-56248481-1302087933-1644394174-1001)<br />
Warning : In that case, no check is done to verify the existence<br />
of this SID.<br />
<br />
SubInAcl maintains a local cache of SIDs to minimize SID to "Human Name"<br />
translation network cost.<br />
<br />
SubInAcl queries the server where the ressource object is located to<br />
translate or retrieve SIDs. If needed, you can specify another SAM<br />
server to translate SIDs (see /alternatesamserver).<br />
If you try to replace SIDs and the originated domain or server is not online,<br />
you can provide a file containing the needed SIDs (see /offlinesam).<br />
You can dump the local cache of SIDs in a file (see /dumpcachedsids).<br />
<br />
<br />
VIEW_MODE<br />
---------<br />
<br />
/noverbose /verbose<br />
<br />
SubInAcl can be used in a quiet mode (/noverbose) or a in verbose mode<br />
(/verbose , /Noverbose )<br />
You can specify these switches either :<br />
- for the entire comand line :<br />
SubInAcl /noverbose /file *.dat /display<br />
- after a specific action :<br />
SubInacl /file *.dat /display /noverbose /display<br />
<br />
<br />
<br />
TEST_MODE<br />
---------<br />
<br />
/testmode /notestmode (default)<br />
<br />
If /testmode is specified, the changes will not be reflected to the object<br />
security descriptor. This option is useful to test the validity of a comand.<br />
Ex : SubInacl /subdirec \\server\share\*.* /changedomain=DOMA=DOMB<br />
/ifchangecontinue /noverbose /display /testmode<br />
For each file modified this comand displays the modified security<br />
descriptor. But these changes will not physically apply to the files<br />
<br />
<br />
<br />
OBJECT_TYPE<br />
-----------<br />
<br />
/file /subdirectories /onlyfile /keyreg /subkeyreg /service /share /clustershare /printer<br />
/kernelobject /metabase /process /samobject<br />
<br />
SubInAcl can work with various objects:<br />
- Files :<br />
/file<br />
/subdirectories<br />
/onlyfile<br />
- Registry keys :<br />
/keyreg<br />
/subkeyreg<br />
- Services :<br />
/service<br />
- Shares :<br />
/share<br />
/clustershare<br />
- Printer :<br />
/printer<br />
- Kernel named objects :<br />
/kernelobject<br />
- IIS adminidstration rights :<br />
/metabase<br />
// - Process :<br />
/process<br />
- Sam :<br />
/SamObject<br />
<br />
The actions are valid for all objects<br />
Most of them support the enumeration with the * character<br />
<br />
<br />
DOMAIN_MIGRATION<br />
----------------<br />
<br />
explain how to migrate security between domain SIDs<br />
<br />
The main purpose of SubInAcl is to help administrators to migrate user(s)<br />
if the domain architecture has changed.<br />
For instance, the user John has moved and is now member of the DOMB domain.<br />
You can reflect this change with :<br />
SubInAcl /subdirec \\server\share\*.* /replace=OldDomain\John=DOMB\John<br />
N.B: A trust relationship must be enabled between the domain of server and<br />
OldDomain and NEWDOMAIN<br />
N.B: If a trust relationship cannot be enabled, you can use the<br />
/alternatesamserver=Server. Server should be the name of Domain Controller<br />
Server<br />
<br />
Sample :<br />
You have worked with a unique domain.<br />
You want to migrate a BDC named MIGRCONTROL with all the files and the<br />
users utilized on a new domain<br />
1. Reinstall the BDC as PDC to the NEWDOMAIN (without erasing the files)<br />
2. Create the users on NEWDOMAIN<br />
3. Create a "trusted relationship" with OLDDOMAIN<br />
4. Run SubInAcl /noverbose /subdirectories x:\*.*<br />
/changedomain=OLDDOMAIN=NEWDOMAIN<br />
5. Verify the changes with SubInAcl /noverbose /subdirectories x:\*.*<br />
<br />
Sample :<br />
You have worked with a standalone server named SERVER in a workgroup<br />
environment. You want to move this server (including users) to a domain DOM.<br />
1. Move SERVER to the domain DOM<br />
2. Create the users in the DOM domain<br />
3. SubInAcl /noverbose /subdirectories \\server\share<br />
/changedomain=SERVER=DOM<br />
<br />
See /changedomain /migratedomain /replace actions<br />
<br />
<br />
SERVER_MIGRATION<br />
----------------<br />
<br />
explain how to migrate SIDs when objects are moved from one server to another one<br />
<br />
Migrating file system from one local server to another local server is not<br />
a trivial task. SubInAcl Version 2.2 has been enhanced to help this migration<br />
process.<br />
To migrate file system files from one local server and to preserve security,<br />
you can perform the following steps:<br />
1. use scopy to copy files and ACLs on destination server<br />
2. create local groups on the destination server<br />
3. Use /changedomain or /changedomain with the /alternatesamserver option :<br />
By default SubInAcl queries the server where the objects are located to<br />
retrieve SIDS. This server is not aware of the SIDs valid on another<br />
standalone server<br />
To address this issue, you can use the /alternatesamserver option to ask<br />
SubInAcl to to use the alternamesamserver server if a SID resolution is<br />
not successfull on the initial server.<br />
Sample :<br />
SubInAcl /alternatesamserver=SourceServer /subdirect<br />
\\DestServer\Share\*.*<br />
/migratedomain=SourceServer=DestServer<br />
<br />
See /alternatesamserver /migratedomain /offlinesam<br />
<br />
<br />
EDITING_FEATURES<br />
----------------<br />
<br />
how to edit parts of the security descriptor<br />
<br />
SubInAcl allows to modify each part of a a security descriptor :<br />
- owner<br />
see /owner=SID or /setowner=SID<br />
- primary group<br />
see /setprimarygroup=GroupSID<br />
- system ACL (SubInAcl name = Audit ACL) with Access Control Entries<br />
(SubInAcl name= AAce = Audit ACE)<br />
see /audit /sgrant /sdeny /sallowdeny<br />
- discretionnary ACL (SubInAcl name = Perm ACL ) with Access Control Entries<br />
(SubInAcl name= PAce = Perm ACE)<br />
see /perm /pace=xxx /revoke=SID /grant=SID=Access /deny=SID=access<br />
/sgrant=SID=Access /sdeny=SID=access<br />
/sallowdeny=SID=access- or the full security descriptor<br />
see /sddl=sddl_string<br />
<br />
<br />
<br />
/SERVICE<br />
--------<br />
<br />
/service service_name<br />
<br />
manipulate service<br />
- \\ServerName\Messenger<br />
- \\ServerName\M*<br />
- Messenger<br />
N.B: /driver can be used also.<br />
/driver * will display all driversm<br />
/service * will display all services<br />
<br />
<br />
/KEYREG<br />
-------<br />
<br />
/keyreg registry_key<br />
<br />
manipulate registry keys<br />
- HKEY_CURRENT_USER\Software<br />
- HKEY_CURRENT_USER\Software\*Version<br />
- \\Srv\HKEY_LOCAL_MACHINE\KeyPath<br />
<br />
<br />
/SUBKEYREG<br />
----------<br />
<br />
/subkeyreg registry_key<br />
<br />
manipulate registry keys and subkeys<br />
- HKEY_CURRENT_USER\Software<br />
- HKEY_CURRENT_USER\Software\*Version<br />
- \\Srv\HKEY_LOCAL_MACHINE\KeyPath<br />
<br />
<br />
/FILE<br />
-----<br />
<br />
/file filename<br />
<br />
manipulate files<br />
N.B: SubInAcl is not supported on DFS volumes<br />
- *.obj<br />
- c:\temp\*.obj<br />
- \\servername\share\*.exe<br />
- c:\<br />
/file=directoriesonly will apply parameters on directories only<br />
/file=filesonly will apply parameters on files only<br />
<br />
<br />
/SUBDIRECTORIES<br />
---------------<br />
<br />
/subdirectories file_path<br />
<br />
manipulate files in specified directory and all subdirectories<br />
- c:\temp\*.obj : work with all obj files<br />
- c:\temp\test : work with all test files below the c:\temp directory<br />
- c:\temp\test\*.* : work with all files below temp\test<br />
- c:\temp\test\ : work with all files below temp\test<br />
/subdirectories=directoriesonly will apply parameters on directories only<br />
/subdirectories=filesonly will apply parameters on files only<br />
<br />
<br />
/ONLYFILE<br />
---------<br />
<br />
/onlyfile file_name<br />
<br />
open a file without using the FindFilexxx mechanism.<br />
Can be used to access named pipes or mailslot<br />
- \\.\pipe\pipename<br />
<br />
<br />
/SAMOBJECT<br />
----------<br />
<br />
/samobject samobject<br />
<br />
allow to access ACL associated to SAM objects(users,localgroup,globalgroup).<br />
Can be used to allow a localgroup(alias) created by a power users on a member<br />
to be updated by another power users member<br />
- \\samserver\localgroup<br />
- \\samserver\*users*<br />
- *group*<br />
- Subinacl /samobject \\sams\testgroup /grant=poweruser1=f<br />
<br />
<br />
/SHARE<br />
------<br />
<br />
/share file_share_name<br />
<br />
access a network file share.<br />
- \\server\share<br />
- \\server\test*<br />
<br />
<br />
/CLUSTERSHARE<br />
-------------<br />
<br />
/clustershare \\clustername\fileshareresource<br />
<br />
access a cluster file share resource.<br />
- \\clustername\FileShare_Resource_Name<br />
- \\clustername\s*<br />
<br />
<br />
/KERNELOBJECT<br />
-------------<br />
<br />
/kernelobject kernel_object_name<br />
<br />
access a named kernel object.<br />
Can be used to view mutex, sections, events objects<br />
<br />
<br />
/PROCESS<br />
--------<br />
<br />
/process pid_or_executable_pattern<br />
<br />
access a process object.<br />
- notepad.* or pid_in_decimal<br />
<br />
<br />
/METABASE <br />
----------<br />
<br />
/metabase metabase_path<br />
<br />
access to IIS metabase AdminACL metabase property<br />
Note that this property can only be used with these Metabase paths<br />
/LM/MSFTPSVC , /LM/MSFTPSVC/n , /LM/W3SVC , /LM/W3SVC/<br />
This object doesn't support enumeration.<br />
- SubInAcl /metabase \\ServerName\LM\W3SVC /grant=administrator=F<br />
<br />
<br />
<br />
/PRINTER <br />
---------<br />
<br />
/printer printername<br />
<br />
access to printer<br />
- \\server\printer1<br />
- \\server\*<br />
<br />
<br />
<br />
/DISPLAY<br />
--------<br />
<br />
/display[=dacl|sacl|owner|primarygroup|sdsize|sddl]<br />
<br />
display the security descriptor<br />
You can also view part of the security descriptor. /display=dacl will<br />
display the discretionary acl. /display=sddl will display the security<br />
using the Win32 SDDL security descriptor string format (see Platform SDK)<br />
The /noverbose display can be used to reapply the security descriptor<br />
(see /playfile)<br />
<br />
<br />
/PLAYFILE<br />
---------<br />
<br />
/playfile playfile<br />
<br />
The /playfile feature allows SubInacl to run in a batch mode.<br />
The format of the playfile command file is : <br />
+ object_type object_name<br />
/action[=parameter]...<br />
/action[=parameter]...<br />
+object_type object_name<br />
/action[=parameter]...<br />
<br />
SubInacl /playfile=playfile.txt with<br />
With playfile :<br />
+subdirec *.txt<br />
/grant=everyone=R<br />
+service RkillSrv<br />
/display<br />
will give the same result than<br />
SubInAcl /subdirectories *.txt /grant=everyone=R<br />
SubInAcl /service RkillSrv /display<br />
<br />
One typical usage of the playfile feature is to allow to reapply security settings<br />
saved previously because the output format of the noverbose /display is a playfile <br />
compatible format:<br />
1.a) SubInAcl /noverbose /outputlog=d:\SubInaclSave.txt /subdirectories c:\*.* /display<br />
This command saves all security settings for the files on C: drive.<br />
Sids will be saved in the Domain\user string format<br />
The /display option in a noverbose mode uses an output playfile compatible format<br />
or<br />
1.b) SubInAcl /error=d:\Err.txt /outputlog=d:\SubInaclSave.txt /subdirectories c:\*.* /display=sddl<br />
This command saves all security settings using the Win32 SDDL format.<br />
Sids will be saved in the S-1-x-x form. This will not require SubInacl to translate Sids<br />
This may minimize the elapsed time and resource usage<br />
2) SubInAcl /playfile d:\SubInaclSave.txt<br />
This command will reapply the previously saved settings.<br />
<br />
One other advantage of using a playfile is to improve performance and save network<br />
bandwidth because SubInacl maintains a local cache of SIDs.<br />
For instance if you issue :<br />
SubInacl /subdirectories c:\*.* /migrate=domain1=domain2<br />
And<br />
SubInacl /subdirectories d:\*.* /migrate=domain1=domain2<br />
<br />
Batching these commands will reduce the network usage bandwidth and improve<br />
performance because SID TO HUMAN NAME resolution process will be reduced.<br />
<br />
<br />
/OUTPUTLOG<br />
----------<br />
<br />
/outputlog=filename<br />
<br />
all outputs will be send in filename. You need to use /errlog switch to<br />
redirect all errors in a different file<br />
<br />
<br />
/ERRORLOG<br />
---------<br />
<br />
/errorlog=filename.txt<br />
<br />
all errors will be send in the filename.txt<br />
<br />
<br />
/ALTERNATESAMSERVER<br />
-------------------<br />
<br />
/alternatesamserver=Server<br />
<br />
SubInAcl queries the Server where the object is located to lookup Sids.<br />
Under some circumstances , you may need ( see server_migration or<br />
domain_migration) to retrieve Sids from another server. If a Sid resolution is<br />
unsuccessful, this option allows SubInAcl to query the alternamesamserver.<br />
<br />
<br />
/OFFLINESAM<br />
-----------<br />
<br />
/offlinesam=FileName<br />
<br />
By default, SubInAcl queries the Server where the object is located to lookup<br />
Sids.Under some circumstances (migration where the source server is offline<br />
or if a domain is no longer available, want to avoid network round trip<br />
for SIDs retrievals), you may allow SubInAcl.exe to retrieve SIDs from <br />
the FileName file.<br />
File format is :<br />
__cachefileonly__=s-1-9-cacheonly<br />
domain\simon=S-1-5-21-1190502449-1716722630-1654032285-1105<br />
nat\julien=S-1-5-21-1060284298-436374069-1708537768-1005<br />
<br />
where domain\simon and nat\julien can be a domain account or server account.<br />
With the __cachefileonly__ line in the file, SubInAcl.exe will not query<br />
SAM Server(s) anymore. All needed SIDs should be found in the SAM<br />
cache file<br />
<br />
<br />
/DUMPCACHEDSIDS<br />
---------------<br />
<br />
/dumpcachedsids=FileName<br />
<br />
At the end of the subinacl execution,<br />
you can dump the contents of the local cache Sids in a file.<br />
This file can later be used for future SubInacl execution (see .<br />
/offlinesam) to speed up the Sids resolution process)<br />
<br />
<br />
/SETOWNER<br />
---------<br />
<br />
/setowner=SID<br />
<br />
will change the owner of the object<br />
/owner=SID or /setowner=SID<br />
owner = DomainName\Administrators will retrieve the Administrators Sid on<br />
the server where the object is (see Win32 SDK LookupAccountName function).<br />
<br />
<br />
/REPLACE<br />
--------<br />
<br />
/replace=DomainName\OldAccount=DomainName\New_Account<br />
<br />
replace all ACEs (Audit and Permissions) in the object<br />
Ex: /replace=DOM_MARKETING\ChairMan=NEWDOM\NewChairMan will replace<br />
all ACEs containing DOM_MARKETING\ChairMan with NewChairMan SID<br />
retrieves from NEWDOM domain<br />
Warning: if DomainName\New_Account has already an ACE, ACE replacement is<br />
skipped<br />
<br />
<br />
/ACCOUNTMIGRATION<br />
-----------------<br />
<br />
/accountmigration=DomainName\OldAccount=DomainName\New_Account<br />
<br />
(see /replace)<br />
will :<br />
- replace owner or primary group if one of them is DomainName\OldAccount.<br />
- duplicate ACE(s) with reference to DomainName\OldAccount for New_Account<br />
Ex: /accountmigration=DOM_MARKETING\ChairMan=NEWDOM\NewChairMan will<br />
duplicate all ACEs containing DOM_MARKETING\ChairMan with NewChairMan SID<br />
retrieves from NEWDOM domain<br />
Warning : if DomainName\New_Account has already an ACE, ACE replacement is<br />
skipped<br />
<br />
<br />
/CLEANDELETEDSIDSFROM<br />
---------------------<br />
<br />
/cleandeletedsidsfrom=domain[=dacl|sacl|owner|primarygroup|all]<br />
<br />
delete all ACEs containing deleted (no valid) Sids from DomainName<br />
You can specify which part of the security descriptor will be scanned<br />
(default=all)<br />
If the owner is deleted, new owner will be the Administrators group.<br />
If the primary group is deleted, new primary group will be the Users group.<br />
<br />
<br />
/CHANGEDOMAIN<br />
-------------<br />
<br />
/changedomain=OldDomainName=NewDomainName[=MappingFile[=Both]]<br />
<br />
replace all ACEs with a Sid from OldDomainName<br />
with the equivalent Sid found in NewSamServer<br />
Ex: /changedomain=DOM_MARKETING=NEWDOMAIN<br />
replace all ACEs containing DOM_MARKETING\ChairMan SID<br />
with the ChairMan's SID retrieved on NEWDOMAIN computer<br />
The NEWDOMAIN must have a trusted relationship with the server<br />
containing the object<br />
<br />
If you want to explicitly specify the users affected , you can specify a<br />
mapping file. The MappingFile file will allow you to specify the list of<br />
users affected and the name of the replacing user in the NewDomain<br />
<br />
Below a sample of a MappingFile<br />
<br />
simon=julien<br />
administrator=administrator <br />
<br />
OldDomainName\Simon will be replaced by NewDomainName\Julien and<br />
OldDomainName\Administrator will be replaced with<br />
NewDomainName\Administrator<br />
<br />
If you use /changedomain=OldDomainName=NewDomainName=MappingFile notation<br />
,only users defined in this file will be migrated.<br />
If you use /changedomain=OldDomainName=NewDomainName=MappingFile=Both,<br />
the mapping file will be examined first to determine if a mapping user<br />
exist. If not, SubInacl will try to find the equivalent user in the<br />
NewDomainName<br />
<br />
<br />
/MIGRATETODOMAIN<br />
----------------<br />
<br />
/migratetodomain=FromDomainName=ToDomainName[=MappingFile[=Both]]<br />
<br />
same behavior than /changedomain except that news ACEs will added instead<br />
of replacing<br />
Ex: /migratetodomain=DOM1=DOM2<br />
each ace with DOM1\User will be duplicated with DOM2\User<br />
(If DOM2\User exists)<br />
If during the migration there was a serious oversight<br />
you can instruct the user to log back onto DOM1.<br />
N.B: Owner and Primary Group are migrated to DOM2<br />
<br />
<br />
/FINDSID<br />
--------<br />
<br />
/findsid=DomainName\Account[=stop|continue]<br />
<br />
display the object name containing a reference to DomainName\Account<br />
in the security descriptor<br />
stop - if Account is found, next parameters will be skipped<br />
and changes will not be applied<br />
- if Account is not found, next parameter will be executed<br />
continue - if Account found, next parameters will be executed<br />
- if Account not found, next parameters will be skipped<br />
and changes will not be applied<br />
<br />
<br />
/SUPPRESSSID<br />
------------<br />
<br />
/suppresssid=DomainName\Account<br />
<br />
suppress all ACES containing the DomainName\Account SID.<br />
If the object's owner is DomainName\Account, the owner is set to<br />
Everyone's SID.<br />
<br />
<br />
/PERM<br />
-----<br />
<br />
/perm<br />
<br />
suppress all existing permissions aces (PACEs)<br />
<br />
<br />
/AUDIT<br />
------<br />
<br />
/audit<br />
<br />
suppress all existing auditing aces (AACEs)<br />
<br />
<br />
/IFCHANGECONTINUE<br />
-----------------<br />
<br />
/ifchangecontinue<br />
<br />
continue to process the next actions only if some changes have been<br />
made in the previous actions<br />
<br />
<br />
/TESTMODE<br />
---------<br />
<br />
/testmode<br />
<br />
changes will not be applied to the object. This allows to test the<br />
modifications<br />
<br />
<br />
/ACCESSCHECK<br />
------------<br />
<br />
/accesscheck=Domain\Username<br />
<br />
display the access granted to the Domain\Username. The password will<br />
be asked. This option requires the SeTcbName privilege (Act as Part<br />
of the Operating System). This option cannot be used with remote object.<br />
Note : the access is checked with the NETWORK security identified<br />
granted to the Domain\UserName<br />
<br />
<br />
/SETPRIMARYGROUP<br />
----------------<br />
<br />
/setprimarygroup=[DomainName\]Group<br />
<br />
change the primary group<br />
<br />
<br />
/DENY<br />
-----<br />
<br />
/deny=[DomainName\]User[=Access]<br />
<br />
add a denied Permission Ace for the specified User (or group)<br />
If Access is not specified, all accesses will be denied.<br />
<br />
File:<br />
F : Full Control<br />
C : Change<br />
R : Read<br />
P : Change Permissions<br />
O : Take Ownership<br />
X : eXecute<br />
E : Read eXecute<br />
W : Write<br />
D : Delete<br />
<br />
ClusterShare:<br />
F : Full Control<br />
R : Read<br />
C : Change<br />
<br />
Printer:<br />
F : Full Control<br />
M : Manage Documents<br />
P : Print<br />
<br />
KeyReg:<br />
F : Full Control<br />
R : Read<br />
A : ReAd Control<br />
Q : Query Value<br />
S : Set Value<br />
C : Create SubKey<br />
E : Enumerate Subkeys<br />
Y : NotifY<br />
L : Create Link<br />
D : Delete<br />
W : Write DAC<br />
O : Write Owner<br />
<br />
Service:<br />
F : Full Control<br />
R : Generic Read<br />
W : Generic Write<br />
X : Generic eXecute<br />
L : Read controL<br />
Q : Query Service Configuration<br />
S : Query Service Status<br />
E : Enumerate Dependent Services<br />
C : Service Change Configuration<br />
T : Start Service<br />
O : Stop Service<br />
P : Pause/Continue Service<br />
I : Interrogate Service <br />
U : Service User-Defined Control Commands<br />
<br />
Share:<br />
F : Full Control<br />
R : Read<br />
C : Change<br />
<br />
Metabase:<br />
F : Full Control<br />
R : Read - MD_ACR_READ<br />
W : Write - MD_ACR_WRITE<br />
I : Restricted Write - MD_ACR_RESTRICTED_WRITE<br />
U : Unsecure props read - MD_ACR_UNSECURE_PROPS_READ<br />
E : Enum keys- MD_ACR_ENUM_KEYS<br />
D : write Dac- MD_ACR_WRITE_DAC<br />
<br />
Process:<br />
F : Full Control<br />
R : Read<br />
W : Write<br />
X : eXecute<br />
<br />
SamObject:<br />
F : Full Control<br />
W : Write<br />
R : Read<br />
X : Execute<br />
<br />
<br />
/REVOKE<br />
-------<br />
<br />
/revoke=[DomainName\]User<br />
<br />
suppress all Permission Ace(s) for the specified User (or group)<br />
<br />
<br />
/GRANT<br />
------<br />
<br />
/grant=[DomainName\]User[=Access]<br />
<br />
will add a Permission Ace for the user.<br />
if Access is not specified, the Full Control access will be granted.<br />
<br />
File:<br />
F : Full Control<br />
C : Change<br />
R : Read<br />
P : Change Permissions<br />
O : Take Ownership<br />
X : eXecute<br />
E : Read eXecute<br />
W : Write<br />
D : Delete<br />
<br />
ClusterShare:<br />
F : Full Control<br />
R : Read<br />
C : Change<br />
<br />
Printer:<br />
F : Full Control<br />
M : Manage Documents<br />
P : Print<br />
<br />
KeyReg:<br />
F : Full Control<br />
R : Read<br />
A : ReAd Control<br />
Q : Query Value<br />
S : Set Value<br />
C : Create SubKey<br />
E : Enumerate Subkeys<br />
Y : NotifY<br />
L : Create Link<br />
D : Delete<br />
W : Write DAC<br />
O : Write Owner<br />
<br />
Service:<br />
F : Full Control<br />
R : Generic Read<br />
W : Generic Write<br />
X : Generic eXecute<br />
L : Read controL<br />
Q : Query Service Configuration<br />
S : Query Service Status<br />
E : Enumerate Dependent Services<br />
C : Service Change Configuration<br />
T : Start Service<br />
O : Stop Service<br />
P : Pause/Continue Service<br />
I : Interrogate Service <br />
U : Service User-Defined Control Commands<br />
<br />
Share:<br />
F : Full Control<br />
R : Read<br />
C : Change<br />
<br />
Metabase:<br />
F : Full Control<br />
R : Read - MD_ACR_READ<br />
W : Write - MD_ACR_WRITE<br />
I : Restricted Write - MD_ACR_RESTRICTED_WRITE<br />
U : Unsecure props read - MD_ACR_UNSECURE_PROPS_READ<br />
E : Enum keys- MD_ACR_ENUM_KEYS<br />
D : write Dac- MD_ACR_WRITE_DAC<br />
<br />
Process:<br />
F : Full Control<br />
R : Read<br />
W : Write<br />
X : eXecute<br />
<br />
SamObject:<br />
F : Full Control<br />
W : Write<br />
R : Read<br />
X : Execute<br />
<br />
<br />
/SALLOWDENY<br />
-----------<br />
<br />
/sallowdeny=[DomainName\]User[=Access]<br />
<br />
will add an Allow/Failed Audit Ace for the user and remove all existing<br />
Audit Ace for this user(or group).<br />
if Access is not specified, the Full Control access mask will be used.<br />
Ex: SubInacl /file c:\windows\explorer.exe /sallowdeny=everyone=R<br />
will set the audit for everyone's successful and failed access<br />
<br />
<br />
/SGRANT<br />
-------<br />
<br />
/sgrant=[DomainName\]User[=Access]<br />
<br />
will add a Successfull (Allow) Audit Ace for the user and remove all existing<br />
Audit Ace for this user(or group).<br />
if Access is not specified, the Full Control access mask will be used.<br />
Ex: SubInacl /file c:\windows\explorer.exe /sgrant=everyone=R<br />
will set the audit for everyone's successful access<br />
<br />
File:<br />
F : Full Control<br />
C : Change<br />
R : Read<br />
P : Change Permissions<br />
O : Take Ownership<br />
X : eXecute<br />
E : Read eXecute<br />
W : Write<br />
D : Delete<br />
<br />
ClusterShare:<br />
F : Full Control<br />
R : Read<br />
C : Change<br />
<br />
Printer:<br />
F : Full Control<br />
M : Manage Documents<br />
P : Print<br />
<br />
KeyReg:<br />
F : Full Control<br />
R : Read<br />
A : ReAd Control<br />
Q : Query Value<br />
S : Set Value<br />
C : Create SubKey<br />
E : Enumerate Subkeys<br />
Y : NotifY<br />
L : Create Link<br />
D : Delete<br />
W : Write DAC<br />
O : Write Owner<br />
<br />
Service:<br />
F : Full Control<br />
R : Generic Read<br />
W : Generic Write<br />
X : Generic eXecute<br />
L : Read controL<br />
Q : Query Service Configuration<br />
S : Query Service Status<br />
E : Enumerate Dependent Services<br />
C : Service Change Configuration<br />
T : Start Service<br />
O : Stop Service<br />
P : Pause/Continue Service<br />
I : Interrogate Service <br />
U : Service User-Defined Control Commands<br />
<br />
Share:<br />
F : Full Control<br />
R : Read<br />
C : Change<br />
<br />
Metabase:<br />
F : Full Control<br />
R : Read - MD_ACR_READ<br />
W : Write - MD_ACR_WRITE<br />
I : Restricted Write - MD_ACR_RESTRICTED_WRITE<br />
U : Unsecure props read - MD_ACR_UNSECURE_PROPS_READ<br />
E : Enum keys- MD_ACR_ENUM_KEYS<br />
D : write Dac- MD_ACR_WRITE_DAC<br />
<br />
Process:<br />
F : Full Control<br />
R : Read<br />
W : Write<br />
X : eXecute<br />
<br />
SamObject:<br />
F : Full Control<br />
W : Write<br />
R : Read<br />
X : Execute<br />
<br />
<br />
/SDENY<br />
------<br />
<br />
/sdeny=[DomainName\]User[=Access]<br />
<br />
will add a Failed Audit Ace for the user and remove all existing<br />
Audit Ace for this user(or group).<br />
if Access is not specified, the Full Control access mask will be used.<br />
<br />
File:<br />
F : Full Control<br />
C : Change<br />
R : Read<br />
P : Change Permissions<br />
O : Take Ownership<br />
X : eXecute<br />
E : Read eXecute<br />
W : Write<br />
D : Delete<br />
<br />
ClusterShare:<br />
F : Full Control<br />
R : Read<br />
C : Change<br />
<br />
Printer:<br />
F : Full Control<br />
M : Manage Documents<br />
P : Print<br />
<br />
KeyReg:<br />
F : Full Control<br />
R : Read<br />
A : ReAd Control<br />
Q : Query Value<br />
S : Set Value<br />
C : Create SubKey<br />
E : Enumerate Subkeys<br />
Y : NotifY<br />
L : Create Link<br />
D : Delete<br />
W : Write DAC<br />
O : Write Owner<br />
<br />
Service:<br />
F : Full Control<br />
R : Generic Read<br />
W : Generic Write<br />
X : Generic eXecute<br />
L : Read controL<br />
Q : Query Service Configuration<br />
S : Query Service Status<br />
E : Enumerate Dependent Services<br />
C : Service Change Configuration<br />
T : Start Service<br />
O : Stop Service<br />
P : Pause/Continue Service<br />
I : Interrogate Service <br />
U : Service User-Defined Control Commands<br />
<br />
Share:<br />
F : Full Control<br />
R : Read<br />
C : Change<br />
<br />
Metabase:<br />
F : Full Control<br />
R : Read - MD_ACR_READ<br />
W : Write - MD_ACR_WRITE<br />
I : Restricted Write - MD_ACR_RESTRICTED_WRITE<br />
U : Unsecure props read - MD_ACR_UNSECURE_PROPS_READ<br />
E : Enum keys- MD_ACR_ENUM_KEYS<br />
D : write Dac- MD_ACR_WRITE_DAC<br />
<br />
Process:<br />
F : Full Control<br />
R : Read<br />
W : Write<br />
X : eXecute<br />
<br />
SamObject:<br />
F : Full Control<br />
W : Write<br />
R : Read<br />
X : Execute<br />
<br />
<br />
/OBJECTEXCLUDE<br />
--------------<br />
<br />
/objectexclude=pattern<br />
<br />
all objects matching the pattern string will be skipped (eXcluded).<br />
The only wildcard valid is *. It can be used everywhere in the string.<br />
Pattern may be a name ( *Name.exe ) or a path ( *dir\subdir\*ToExclude* ).<br />
<br />
<br />
/PATHEXCLUDE<br />
------------<br />
<br />
/pathexclude=pattern<br />
<br />
all containers matching the pattern string will not be enumerated.<br />
See /objectexclude<br />
N.B: the Actions specified will not be applied to the container too.<br />
<br />
<br />
/STATISTIC<br />
----------<br />
<br />
/statistic<br />
<br />
will display statistics when processing is finished.<br />
<br />
<br />
/CROSSREPARSEPOINT<br />
------------------<br />
<br />
/crossreparsepoint<br />
<br />
When processing a file system path, SubInacl will enumerate<br />
file and directories below a reparsepoint except if /nocrossreparsepoint.<br />
is specified.<br />
<br />
<br />
/STRINGREPLACEONOUTPUT<br />
----------------------<br />
<br />
/stringreplaceonoutput=string1=string2<br />
<br />
All occurrences of string1 will be replaced by string2 in subinacl output.<br />
<br />
<br />
/SDDL<br />
-----<br />
<br />
/sddl=sddl_string<br />
<br />
specify the Security descriptor for the object using the Win32 security<br />
descriptor definition language (SDDL)<br />
<br />
<br />
/APPLYONLY<br />
----------<br />
<br />
/applyonly=dacl,sacl,owner,group<br />
<br />
Some subinacl options may change parts (owner,group,dacl,sacl) of the security descriptor.<br />
You may restrict the change to some parts of the security descriptor only .<br />
For instance /applyonly=dacl,sacl,owner will not modify the primary group field<br />
<br />
<br />
/PATHCOPYSECURITY<br />
-----------------<br />
<br />
/pathcopysecurity=path_container<br />
<br />
SubInacl will reset the security descriptor for the object with the same named object<br />
in the container path.<br />
Ex: - SubInacl /file c:\temp\*.txt /pathcopysecurity=d:\test<br />
will replace the security (acls,owner,primarygroup) for c:\temp\1.txt with the security<br />
retrieved from d:\test\1.txt (if this file exists)<br />
-SubInacl /service Messenger /pathcopysecurity=\\Server<br />
will update the security on the service Messenger with the security existing on the remote<br />
messenger service<br />
<br />
<br />
/OBJECTCOPYSECURITY<br />
-------------------<br />
<br />
/objectcopysecurity=object_path<br />
<br />
SubInacl will reset the security descriptor with the object object_path<br />
in the container path.<br />
Ex: - SubInacl /file c:\temp\*.txt /objectcopysecurity=d:\test\mask.txt<br />
will replace the security (acls,owner,primarygroup) for all txt files<br />
in c: emp with the security retrieved on d:\test\amsk.txt<br />
will update the security on the service Messenger with the security existing on the remote<br />
messenger service<br />
<br /><em>With help from this awesome post: </em><a href="http://www.vanstechelman.eu/windows/how_to_use_subinacl"><em>http://www.vanstechelman.eu/windows/how_to_use_subinacl</em></a>Piyush Nasahttp://www.blogger.com/profile/11750828958665245404noreply@blogger.com0tag:blogger.com,1999:blog-29452818.post-88474421159833718932012-07-17T20:26:00.001-07:002012-08-22T20:48:31.628-07:00VBScript to Find and ReplaceI have been using this script for some time now. I took inputs from some sites to create this VBScript. I have modified it to my needs. I want to share this and keep it gfor my reference for future use as well.<br />
I am searching for a text and replacing it with the User input of mail id.<br />
<br />
'-----------------------------------------------------<br />
'Use the below function if you want it to run from commandline and take input from users.<br />
'If WScript.Arguments.Count <> 2 then <br />
' WScript.Echo "usage: Find_And_replace.vbs filename word_to_find replace_with " <br />
' WScript.Quit <br />
'end If <br />
MailID=InputBox("Please enter your E-Mail ID")<br />
sFind="abcxyz.com"<br />
Set oshell=CreateObject("Wscript.shell")<br />
prog=oshell.ExpandEnvironmentStrings("%ProgramFiles(x86)%")<br />
TargetFile= prog & "\App\config.ini"<br />
TempFile= prog & "\App\config1.ini"<br />
FindAndReplace TargetFile, sFind, MailID<br />
WScript.Echo "Operation Complete" <br />
<br />
function FindAndReplace(strFile, strFind, strReplace) <br />
Set objFSO = CreateObject("Scripting.FileSystemObject") <br />
Set objInputFile = objFSO.OpenTextFile(strFile,1) <br />
'strTempDir = objFSO.GetSpecialFolder(2) <br />
Set objTempFile = objFSO.OpenTextFile(TempFile,2,true) <br />
do until objInputFile.AtEndOfStream <br />
objTempFile.WriteLine(Replace(objInputFile.ReadLine, strFind, strReplace)) <br />
loop <br />
objInputFile.Close <br />
Set objInputFile = Nothing <br />
objTempFile.Close <br />
Set objTempFile = Nothing <br />
objFSO.DeleteFile strFile, true <br />
objFSO.MoveFile TempFile, strFile <br />
Set objFSO = Nothing <br />
end function <br />
'-----------------------------------------------------<br />
<br />
You can modify this script based on your needs and use it.Piyush Nasahttp://www.blogger.com/profile/11750828958665245404noreply@blogger.com0tag:blogger.com,1999:blog-29452818.post-25748574255152767362012-07-10T17:56:00.000-07:002012-07-10T17:56:14.585-07:00Internal Consistency EvaluatorsThis is some material on ICE which I got some time back from AngelD and wanted to post here for my and everyone's reference.<br />
<br />
ICE02<br />
CASE 1: File: 'Red_File' cannot be the key file for Component: 'Blue'. The file belongs to Component: 'Red'<br />
Fix:<br />
Search for the component name in all the other tables in the following order:<br />
• If the component name is found in the Files Table, then set the keypath for the Component to be the name of the first column in the file table.<br />
• If the component name is found in the Registry Table then set the keypath for the Component to be the name of the first column in the Registry table, and add 4 to the Attributes column.<br />
• If the component name is not found in either table, leave the keypath blank<br />
CASE 2: ' Red_Key' cannot be the key registry key for Component: 'Blue'. The RegKey belongs to Component: 'Red'<br />
Fix:<br />
Search for the component name in all the other tables in the following order:<br />
• If the component name is found in the Registry Table then set the keypath for the Component to be the name of the first column in the Registry table<br />
• If the component name is found in the Files Table, then set the keypath for the Component to be the name of the first column in the file table, and subtract 4 from the Attributes column.<br />
• If the component name is not found in either table, leave the keypath blank<br />
<br />
ICE03<br />
CASE 1: String overflow (greater than length permitted in column):<br />
This validation error will not cause the installation to behave adversely. The help file says “that the installer does not internally limit the column width to the specified value.”<br />
This error can be removed by using ShortFile Names. This should be removed when it can be.<br />
<br />
CASE 2: Value not a member of the set:<br />
Example<br />
ICE03 ERROR Value not a member of the set; Table: Feature, Column: Attributes, Key(s): MirrorTask<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnjNB7XOA-yZr1rl5Zbzk0ZrsvtY23XE2a-mzwZQv-G-MwgzvrYxemHcHqRjoRniiBtY_ulkFPtkccBj9QkTz9VTz17t4PGss1LUajRZQhjATjZxrJ3M503F9StFzS0CYU1Wpohg/s1600-h/1.JPG"></a><br />
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVcTu_Yvh6ThgkJGm2ok0EIMdK8QHHYmGhDqjA6fBG9n0VPv5UbxxOnKzu8Mq7c7G1MIiRvP5xvcLA-HW8TElGZfuXt-ZCGTCKrkBTOhgTyjOr4CDhtAQu9v6rx5UDr6sZMz4k6g/s1600-h/01.bmp"><img alt="" border="0" height="117" id="BLOGGER_PHOTO_ID_5234679406965841778" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVcTu_Yvh6ThgkJGm2ok0EIMdK8QHHYmGhDqjA6fBG9n0VPv5UbxxOnKzu8Mq7c7G1MIiRvP5xvcLA-HW8TElGZfuXt-ZCGTCKrkBTOhgTyjOr4CDhtAQu9v6rx5UDr6sZMz4k6g/s400/01.bmp" style="float: left; height: 94px; margin: 0px 10px 10px 0px; width: 439px;" width="480" /></a><br />
<br />
<br />
<br />
<br />
<br />
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
The validation is complaining that the value 40 not a member of the set allowed in the Attributes column of the Feature Table.<br />
The values that are allowed in this column are defined in the _Validation Table, shown below.</div>
<br />
<div>
</div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjB_514WA_xWZoKvBSVlH6nYNb4hWRlnY_eQ9twV9QB6BHKhaW3PPU0qVgaqtn8LkaT7TCGt3XZ1jCu_x0yYA124shw_fT79Biuf5AiBTeVliyEwyxSr7-aAfLenfgFcAvVdAEtSA/s1600-h/2.JPG"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5234680514505970226" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjB_514WA_xWZoKvBSVlH6nYNb4hWRlnY_eQ9twV9QB6BHKhaW3PPU0qVgaqtn8LkaT7TCGt3XZ1jCu_x0yYA124shw_fT79Biuf5AiBTeVliyEwyxSr7-aAfLenfgFcAvVdAEtSA/s400/2.JPG" style="float: left; margin: 0px 10px 10px 0px;" /></a><br />
<br />
<br />
<br />
<br />
<br />
<br />
<div>
</div>
<div>
This says that only the numbers 0,1,2,4,5,6,8,9,10,16,17,18,20,21,22,24,25,26,32,33,34,36,37,38,48,49,50,52,53 and 54 are allowed in the Attributes field.<br />
Looking at the help page for the Feature Table the value of 40 is unacceptable, since it represents 8+32, which are not allowed in combination.<br />
The help page says “Do not use msidbFeatureAttributesNoUnsupportedAdvertise (32) with msidbFeatureAttributesDisallowAdvertise (8).”<br />
Solution:<br />
Change the Attribute column of the Feature table to 16/48<br />
<br />
CASE 3: Not a valid foreign key; Table: ProgId, Column: Class_, Key(s): Notes.NotesUIWorkspace<br />
<br />
Solution:<br />
Go to the ProgID table find the row that refers to Notes.NotesUIWorkspace and take note of the CLSID value. Once this has been noted, check the CLSID column in the Class_ table. This value was found to be missing, so copy the value and place it into the CLSID column of the Class_ table and fill in the rest of the information. To find out if its Context is LocalServer or LocalServer32 etc. you can look up the Registry in the Installation Expert. For this particular case Notes.NotesUIWorkspace had both LocalServer and LocalServer32 so the row had to be repeated but with this two different values in the Context column.<br />
<br />
ICE07<br />
'MTEXTRA.TTF' is a Font and must be installed to the FontsFolder. Current Install Directory: 'OfficeEquationFolder'<br />
Explanation:<br />
Fonts should be only ever installed into c:\windows\fonts.<br />
This error is caused by fonts being installed elsewhere.<br />
Step1:<br />
Locate the file in the file table and note the name of the component that it is in.</div>
<div>
</div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiaT1TpjUbD5RHr1Vcq0HKqpBY9MuvU0ZgUvnmyJ0v2NlHtQh4N3Ngq74Kl4pzvPBDeHTc2j45DL6wJtkFUrg8N9m0dvJihkPp2DNUCWCXUE4cwN1HoGYO7pz3nOkORdtPU69sOQ/s1600-h/3.JPG"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5234680796104025042" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiaT1TpjUbD5RHr1Vcq0HKqpBY9MuvU0ZgUvnmyJ0v2NlHtQh4N3Ngq74Kl4pzvPBDeHTc2j45DL6wJtkFUrg8N9m0dvJihkPp2DNUCWCXUE4cwN1HoGYO7pz3nOkORdtPU69sOQ/s400/3.JPG" style="float: left; margin: 0px 10px 10px 0px;" /></a><br />
<br />
<br />
<br />
<div>
Here the Component is called Global_Office_EquationEditor<br />
Step2:<br />
Locate that component in the Component Table<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1wwoM0eqTZjchPG2OE9AzmuG9s-YCKbkCUk-g00EsMlmZYtRFUsX3CuPSlSBnw_IkXG8USbSa-7gtbH-97vT_HaDM7ZHp0fGQoFw72LlK1lplNrP7y3ybxCsODSU3Pf6GDccVWw/s1600-h/4.JPG"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5234680898133310866" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1wwoM0eqTZjchPG2OE9AzmuG9s-YCKbkCUk-g00EsMlmZYtRFUsX3CuPSlSBnw_IkXG8USbSa-7gtbH-97vT_HaDM7ZHp0fGQoFw72LlK1lplNrP7y3ybxCsODSU3Pf6GDccVWw/s400/4.JPG" style="float: left; margin: 0px 10px 10px 0px;" /></a></div>
<br />
<br />
<br />
<div>
</div>
<div>
</div>
<br />
<div>
Step3:<br />
Make a new component in step 2, but based on the component changing the Directory_ to FontsFolder (making sure that FontsFolder is defined in the Directory Table) </div>
<div>
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhX78oDcvFgMQUbaLBlSXVbB_hdjzsSOO17NdQ1_e62EqH1jF3Gu5-n0_2vmUaqWQtB2uOdWkbkO98DyTThyphenhyphenO8eAthIqSmIdnFHeBHOcpd-cjcFEWLibMwQ8DMDSmSEqgZtwRGNvA/s1600-h/5.JPG"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5234681268654187618" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhX78oDcvFgMQUbaLBlSXVbB_hdjzsSOO17NdQ1_e62EqH1jF3Gu5-n0_2vmUaqWQtB2uOdWkbkO98DyTThyphenhyphenO8eAthIqSmIdnFHeBHOcpd-cjcFEWLibMwQ8DMDSmSEqgZtwRGNvA/s400/5.JPG" style="float: left; margin: 0px 10px 10px 0px;" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<div>
</div>
<br />
<br />
<br />
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
Component: ICE07Fix1<br />
ComponentId: {GUID} --this needs to be generated. Create a project in Developer, when you add a new component it generates a code that you can use here<br />
Directory_: FontFolder<br />
Attributes: 8<br />
Condition: --copy this from the component that you are fixing<br />
Keypath: --This is the name of the font filename<br />
Step4:<br />
Move the file into this new component<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwEWuCxI-DmCtgAd2UXSLtzm6I426jZCQrBFzl_wruCnFrc7X42Q0B4b8TEAr06gu0NSspRlm9P8kTnMOzGbEJoU2oMfyBJQ8rr2kAK74LMzBposAGTTOgRWyUDeQw4EHffOWvhw/s1600-h/6.JPG"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5234681828031435346" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwEWuCxI-DmCtgAd2UXSLtzm6I426jZCQrBFzl_wruCnFrc7X42Q0B4b8TEAr06gu0NSspRlm9P8kTnMOzGbEJoU2oMfyBJQ8rr2kAK74LMzBposAGTTOgRWyUDeQw4EHffOWvhw/s400/6.JPG" style="float: left; margin: 0px 10px 10px 0px;" /></a></div>
<br />
<br />
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<br />
<div>
Change the Component_ column to point to ICE07Fix1<br />
Step5:<br />
Associate the new component with the existing component’s feature<br />
Find the component that caused the error in the FeatureComponents table and add the new component to the same feature<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjL1bHOvBTKes1xCcUoOGTlJmlBHXhnbUi98VV3hyphenhyphenc2MAWfh7jaDMNvqT0hJSIQoNFi5eOiVpROCDfDXidgI1OY4l4ub4ql9fZyIktEVhkPAVehvY428dB0aataCLikjfB16TxITg/s1600-h/7.JPG"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5234681904337051298" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjL1bHOvBTKes1xCcUoOGTlJmlBHXhnbUi98VV3hyphenhyphenc2MAWfh7jaDMNvqT0hJSIQoNFi5eOiVpROCDfDXidgI1OY4l4ub4ql9fZyIktEVhkPAVehvY428dB0aataCLikjfB16TxITg/s400/7.JPG" style="float: left; margin: 0px 10px 10px 0px;" /></a></div>
<br />
<br />
<br />
<div>
</div>
<div>
</div>
<div>
ICE09<br />
This error is acceptable<br />
Explanation of error:<br />
“ICE09 validates that the permanent bit is set for every component marked for installation into the SystemFolder. ICE09 posts a warning because you should avoid installing non-permanent system components to the SystemFolder.”<br />
ICE18<br />
Example<br />
ICE18 ERROR KeyPath for Component: 'MirrorTask' is Directory: 'INSTALLDIR'.<br />
The Directory/Component pair must be listed in the CreateFolders table<br />
This error message only occurs when you have a component that does not contain files, registry keys or ODBC DSNs.<br />
It is easily solved as the ICE message tells you what to do.<br />
Solution:<br />
Add a row in the CreateFolders Table to create the directory<br />
<br />
This also occurs when you have a registry keypath and you have set the directory to INSTALLDIR. The best way to solve this error is simply go to Component table and change the directory to TARGETDIR. This will solve the ICE Error. No need to make any extra Create Folder.<br />
<br />
ICE19<br />
Shortcut: 'Blah' advertises component: 'ComponentBlah'. This component cannot be advertised because the KeyPath type disallows it.<br />
This error indicates that the shortcut is in the wrong component. The shortcut should be in the same component as the file it refers to.<br />
Solution<br />
Step1: Find the file that the shortcut is pointing to<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4xPEwO8UKfgqYInKrfTiymJP6IK5mpzee88T7E-M_SREkuGirsbAFhK1sybBqXZth86nYeOoGABVKYcGOlcs15euCkp-lNIn-IaV9Z3RcsmdDeIyil4eLyX73mFqw2_cdvj-kXQ/s1600-h/8.JPG"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5234681989106991570" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4xPEwO8UKfgqYInKrfTiymJP6IK5mpzee88T7E-M_SREkuGirsbAFhK1sybBqXZth86nYeOoGABVKYcGOlcs15euCkp-lNIn-IaV9Z3RcsmdDeIyil4eLyX73mFqw2_cdvj-kXQ/s400/8.JPG" style="float: left; margin: 0px 10px 10px 0px;" /></a><br />
<br /></div>
<br />
<br />
<div>
The Target column indicates the File key that the shortcut refers to. Here it is a Formatted text string<br />
Step 2: Find the Component that the file is in<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5ttX-a1kIn0ricySpp9koj8pW9kyG-wqWU35nGdZ7N3E7nPJugcDsrDBnipRHgUzNkb61i8DoNe9WYISHoy2vOvkuniS9SabTUvvoldHP493X9OC3wr1nsPEMZ_iDFPMlt8NlnQ/s1600-h/9.JPG"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5234683436892210050" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5ttX-a1kIn0ricySpp9koj8pW9kyG-wqWU35nGdZ7N3E7nPJugcDsrDBnipRHgUzNkb61i8DoNe9WYISHoy2vOvkuniS9SabTUvvoldHP493X9OC3wr1nsPEMZ_iDFPMlt8NlnQ/s400/9.JPG" style="float: left; margin: 0px 10px 10px 0px;" /></a></div>
<br />
<br />
<div>
</div>
<br />
<div>
</div>
<div>
Here the File DTPhones.exe is in a component of the same name<br />
Step3: Move the shortcut into the correct component<br />
Correct the Component_ column of the Shortcut </div>
<div>
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD1dbkX_MTDXAbuvewDP9STjdyjOv6sF8MszxErjL_NcJOfzBawOMXJk69baHsUfindoJKAAB21vaCU1ZUNYUCBxkHwi59B3jETL738jT-8ciCwJ12MLA2jrNwdRG8AFmMNydbUw/s1600-h/91.JPG"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5234683510347202898" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD1dbkX_MTDXAbuvewDP9STjdyjOv6sF8MszxErjL_NcJOfzBawOMXJk69baHsUfindoJKAAB21vaCU1ZUNYUCBxkHwi59B3jETL738jT-8ciCwJ12MLA2jrNwdRG8AFmMNydbUw/s400/91.JPG" style="float: left; margin: 0px 10px 10px 0px;" /></a><br />
<br />
ICE30<br />
ERROR: The target file 'LONGFI~1.EXElongfilename1.exe' is installed in 'TARGETDIR\PRODUCT' by two different components on an SFN system: 'Component1' and 'Component2'. This breaks component reference counting.<br />
Look at the two files in orca. Sometimes the install compiler makes errors when generating short file names. E.g.<br />
LONGFI~1.EXElongfilename1.exe<br />
LONGFI~1.EXElongfilename2.exe<br />
In this situation it has generated the same short file name for two different files.<br />
To remove the validation error, simply give one of the files a new short file name<br />
ICE33<br />
WARNING Reg key …… is used in an unsupported way. ProgId should be registered via the ProgId table. This entry may overwrite a value created through that table<br />
ICE33 processes entries in the Registry table and may issue a warning for each table entry that registers Classes, Filename Extensions, ProgIDs, Shell Verbs, Remote Server AppIDs, MIME types, or Typelibs.<br />
Though every site you go to will tell you that ICE33 can be ignored, but for the best results, we should remove them if possible. It is not that hard to remove them. Just check the component for which ICE Error is coming. Do rescan advertising for that component and it will put the values in the correct table. Still if you are getting some errors then you can check if the registry still contains the information which is already added to advertising, then you can remove those registries. This will eliminate ICE errors. And even after this if you are getting ICE33 then you can leave them as is in the package.<br />
<br />
ICE36<br />
Icon Bloat. Icon BlahIcon is not used in the Class, Shortcut, or ProgID table. This adversely affects performance.<br />
This ICE checks that all icons that are in the icon table have been used in other tables.<br />
If you have this ICE then you should do a manual search of all the tables to see if there are any references to the icon (e.g. ARPPRODUCTICON often references it). If nothing references the icon then it is safe to delete.<br />
<br />
ICE38<br />
Example<br />
ICE38 ERROR Component Network_Associates installs to user profile.<br />
It must use a registry key under HKCU as its KeyPath, not a file or directory<br />
Solution:<br />
Create an arbitrary registry key in HKEY_CURRENT_USER and set it as the keypath.<br />
• Add 4 to the Attributes column<br />
• Set the KeyPath to the name of your registry key<br />
<br />
ICE41<br />
<br />
Extension rc1 references feature complete and component r1win.exe, but the that component is not associated with that feature in the FeatureComponents table.<br />
<br />
Solution:<br />
Change the entry in the Feature_ column of the Extension table entry to reference a feature that installs the component listed in the Component_ column or change the feature and component associated in the FeatureComponents table<br />
<br />
ICE43<br />
Example<br />
ERROR Component mcstvbi.exe has non-advertised shortcuts.<br />
It should use a registry key under HKCU as its KeyPath, not a file<br />
Solution:<br />
Make the shortcut advertised. This will have the added advantage of putting self-repair functionality into it.<br />
ICE48<br />
Objective:<br />
Checks for directories that are hard-coded to local paths in the Property Table.<br />
Do not hard-code directory paths to local drives because computers differ in the setup of the local drive. This practice may be acceptable if deploying an application to a large number of computers on which the relevant portions of the drives are all the same.<br />
Result:<br />
ICE48 posts an error message if there is a directory that is hard-coded to a local path in the Property table.<br />
Example:<br />
ICE48 would report the following warning for the example shown.<br />
Directory 'Dir1' appears to be hardcoded in the property table to a local drive.<br />
Directory Table (partial)<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6Kjv8X2EUNtKy-rZDN-7dSZQs8aCo7eezEZw2eG-zJFXjshYgN-KR9l3fkF9WOJBHKhvsjk8mV6teGnSr_rWF8kAkSiADgsRwRYd0DZAjWFS2y8DPwvFKuJYpnC_KapzGMuh-7g/s1600-h/92.JPG"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5234684105918909074" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6Kjv8X2EUNtKy-rZDN-7dSZQs8aCo7eezEZw2eG-zJFXjshYgN-KR9l3fkF9WOJBHKhvsjk8mV6teGnSr_rWF8kAkSiADgsRwRYd0DZAjWFS2y8DPwvFKuJYpnC_KapzGMuh-7g/s400/92.JPG" style="float: left; margin: 0px 10px 10px 0px;" /></a></div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
<br />
<br />
Property Table (partial)<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_FdPkGwhSTgCUR1gl8cmieZRf7Z3xEioaAqCqqzeANqZjhmzkuTrN-Fmadb2lcXCMQFIF90m6zX0XCyaunBixklSvqIt65_8kVB0znafJkalRQbyS1DNR-Emk4b0hhQrl2RlloQ/s1600-h/93.JPG"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5234684186575810002" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_FdPkGwhSTgCUR1gl8cmieZRf7Z3xEioaAqCqqzeANqZjhmzkuTrN-Fmadb2lcXCMQFIF90m6zX0XCyaunBixklSvqIt65_8kVB0znafJkalRQbyS1DNR-Emk4b0hhQrl2RlloQ/s400/93.JPG" style="float: left; margin: 0px 10px 10px 0px;" /></a></div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
<br />
<br />
<br />
Resolution:<br />
If an application has a directory named group in its file structure, then this will clash with the entry GROUP in the property table<br />
<br />
A permanent solution to prevent this from happing again is to change the GROUP property to a non dictionary word, and therefore avoid this potential clash in the future.<br />
<br />
ICE57<br />
ERROR Component 'HKCU' has both per-user and per-machine data with a per-machine KeyPath.<br />
1. Create a new component for this (and any other) key that needs to be separated<br />
2. Move the registry key into this new component<br />
3. Associate the new component with the existing component’s feature<br />
ICE60<br />
The file File1 is Versioned. It cannot be hashed<br />
This error is acceptable as the hash table will not be read for the file in question.<br />
You could remove the row from the hash table to remove the error.<br />
The file File1 is a font, its language should be null.<br />
To correct this you should delete anything that is in the language column for the file<br />
ICE64<br />
Example<br />
ERROR: The directory INTERNET_EXPLORER is in the user profile but is not listed in the RemoveFile table.<br />
<br />
Solution:<br />
Put the directory INTERNET_EXPLORER in the RemoveFile table.<br />
<br />
ICE69<br />
Example<br />
ICE69 Mismatched component reference. Entry 'DTPhones.exe' of the Shortcut table belongs to component 'ProgramMenuFolder'. However, the formatted string in column 'Target' references file 'DTPhones.exe' which belongs to component 'DTPhones.exe'. Components are in the same feature.<br />
This means that the Target file is not in the component in the Component_ column<br />
Solution:<br />
Change the Target field to equal the name of the feature that the component is in. You will have to look at the FeatureComponents table to find this out.<br />
<br />
<br />
<br />
ICE82<br />
This action SetOEM_NOCOST has duplicate sequence number 11 in the table InstallExecuteSequence<br />
In a third party MSI, this error should not be a problem because we can assume that the MSI has been tested and the order that the actions fire is good enough<br />
ICE84<br />
Action 'FileCost' found in InstallExecuteSequence table is a required action with a condition.<br />
In Microsoft MSIs it is quite common for the package to reboot and they condition their actions so that only some get rerun after the reboot<br />
In this situation, the error is acceptable<br />
ICE86<br />
WARNING Property `AdminUser` found in …... `Privileged` property is often more appropriate.<br />
The AdminUser property is true if the logged in user is the Administrator, Privileged is true for powerusers too.<br />
It is easy to remove the error message. Simply replace the word AdminUser with Privileged.<br />
ICE88<br />
In the IniFile table entry (IniFile=) PPTCast04 the DirProperty= is not found in Directory/Property/AppSearch/CA-Type51 tables and it is not one of the installer properties<br />
This ice checks that the DirProperty column of the Inifile table is valid. This is intended to check that the ini file changes are made in a valid folder.<br />
Unfortunately this check is not always valid because the help file says “If this field is left blank, the .ini file is created in the folder having the full path specified by the WindowsFolder property.”<br />
If the field is blank and you are happy that the ini file changes should be made in the WindowsFolder, then this error is acceptable</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>Piyush Nasahttp://www.blogger.com/profile/11750828958665245404noreply@blogger.com0tag:blogger.com,1999:blog-29452818.post-67166639734338782492012-07-05T00:03:00.000-07:002012-07-05T00:03:16.234-07:00Creating a Device driver based package in Installshield<span style="font-family: Arial, Helvetica, sans-serif;">It is very easy and simle to create a device driver based application from Installshield.</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;">I am using Installshield 2012.</span><br />
<br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Arial, Helvetica, sans-serif;">You need to make sure that the driver is a signed driver. If
the driver is not signed, then you need to sign the driver first. It is good to
have your driver signed, but you can install and unsigned driver as well. Check
an option later.<o:p></o:p></span></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDxbusbjzn5ercjKQQ6ZsYmcgk8IelBK8hUdxKmc5YFIOZSBLLyhouFjZgF_h8koQ6yDHfYgEr9RH4ArdizNCkq1bB3bU0wyhJVrWM3C1IX73cMQ92r_jwLnvgZ6WXHe2JvfZLSQ/s1600/1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="147" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDxbusbjzn5ercjKQQ6ZsYmcgk8IelBK8hUdxKmc5YFIOZSBLLyhouFjZgF_h8koQ6yDHfYgEr9RH4ArdizNCkq1bB3bU0wyhJVrWM3C1IX73cMQ92r_jwLnvgZ6WXHe2JvfZLSQ/s320/1.jpg" width="320" /></a></div>
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<br /></div>
<br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Arial, Helvetica, sans-serif;">Go to Installshield Wizard in Installation Designer and
click on Project button on top an then Device Driver wizard.<o:p></o:p></span></div>
<br />
<span style="font-family: Arial, Helvetica, sans-serif;">
</span><br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Arial, Helvetica, sans-serif;">Click Next -><o:p></o:p></span></div>
<span style="font-family: Arial, Helvetica, sans-serif;">
</span><br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Arial, Helvetica, sans-serif;">Select the path to your .inf file on your machine. Choose the system
architecture. I am choosing x64 as I am packaging for 64 bit machines.<o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD-3_1Yitqxgt3UG8xEIKeCl06WwGt1t5LOQP8Jr73GShcoC0MPd7zs2vicdJh90IYatJHzOBUL03AlRlyZRAP98RDo4JtaZC3Oe6OFk5Kn_VrmnIr9UCwk-yTyLY9c-qNa5diwg/s1600/2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="243" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD-3_1Yitqxgt3UG8xEIKeCl06WwGt1t5LOQP8Jr73GShcoC0MPd7zs2vicdJh90IYatJHzOBUL03AlRlyZRAP98RDo4JtaZC3Oe6OFk5Kn_VrmnIr9UCwk-yTyLY9c-qNa5diwg/s320/2.jpg" width="320" /></a></div>
<br />
<br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Arial, Helvetica, sans-serif;">Click Next-> Next-><o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf_pfXjQ6GqKDUyo3_aAnAwa2kvBYI5DcJuiH8CKwdqSGRfo9QhJMBBUZEEmn-ZL3u9klCgCwyyJF0bkllYVtld1L0vX6UGL0IPjWuJbMawk0UB5QRlcAAqeExk2rjzuZENw6M0g/s1600/3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="243" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf_pfXjQ6GqKDUyo3_aAnAwa2kvBYI5DcJuiH8CKwdqSGRfo9QhJMBBUZEEmn-ZL3u9klCgCwyyJF0bkllYVtld1L0vX6UGL0IPjWuJbMawk0UB5QRlcAAqeExk2rjzuZENw6M0g/s320/3.jpg" width="320" /></a></div>
<br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Arial, Helvetica, sans-serif;">Select the options as per your requirement. I have chosen
the above ones.<o:p></o:p></span></div>
<span style="font-family: Arial, Helvetica, sans-serif;">
</span><br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Arial, Helvetica, sans-serif;">Click Next-><o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq6n3ctnF8NDuiqY6wgrWIZrlaeIEJp0WwqwEUwm_MTJXjn05MCHS9Tes6Cxkh3UQPT3932OrHk60BXQU99wtqLAco_z9VzLylZ0n08jdUPHOTAzkT-axNYkfse0w0pOcmfnBygw/s1600/4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="243" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq6n3ctnF8NDuiqY6wgrWIZrlaeIEJp0WwqwEUwm_MTJXjn05MCHS9Tes6Cxkh3UQPT3932OrHk60BXQU99wtqLAco_z9VzLylZ0n08jdUPHOTAzkT-axNYkfse0w0pOcmfnBygw/s320/4.jpg" width="320" /></a></div>
<br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Arial, Helvetica, sans-serif;">Click Next-><o:p></o:p></span></div>
<span style="font-family: Arial, Helvetica, sans-serif;">
</span><br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Arial, Helvetica, sans-serif;">You will get the summary and then click on Finish.<o:p></o:p></span></div>
<span style="font-family: Arial, Helvetica, sans-serif;">
</span><br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Arial, Helvetica, sans-serif;">It will add the settings in your component of INF file.<o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyWhOErn494px1ZGVBEdMoRYi357lpO5fJPIm2dQ5R4RDVObvgPyTAWe2dVyW6EITfoxA4Fp0mqb4yySY6xG73x4wX9nPfLpyruYLfX5qEfkBP-uw8XnVnIkX5ymDiHxbE8XqYSw/s1600/5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="123" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyWhOErn494px1ZGVBEdMoRYi357lpO5fJPIm2dQ5R4RDVObvgPyTAWe2dVyW6EITfoxA4Fp0mqb4yySY6xG73x4wX9nPfLpyruYLfX5qEfkBP-uw8XnVnIkX5ymDiHxbE8XqYSw/s320/5.jpg" width="320" /></a></div>
<br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Arial, Helvetica, sans-serif;">Hope this helps you create device driver easily with
Installshield.<o:p></o:p></span></div>Piyush Nasahttp://www.blogger.com/profile/11750828958665245404noreply@blogger.com11tag:blogger.com,1999:blog-29452818.post-3562793228471681602012-06-13T23:35:00.000-07:002012-06-13T23:36:31.819-07:00Top Contributor in ITNinjaToday I have reached the top contributor spot in ITNinja which was earlier famous as AppDeploy.<br />
I was too happy and just wanted to share this on my blog :D<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBPD3D2rmIuDjXU3z6BhJneuwFSR_L8lmWNEpUqVGHVXpeuHjzbgsWuLstJPsmFIxp8t2I6LjhJx1Ew-kuyLjRUpcr41rl4QeyykxR8A3ZYUE92RHyb-CyT3yihAok_Klh3_TgSA/s1600/itninja.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="190" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBPD3D2rmIuDjXU3z6BhJneuwFSR_L8lmWNEpUqVGHVXpeuHjzbgsWuLstJPsmFIxp8t2I6LjhJx1Ew-kuyLjRUpcr41rl4QeyykxR8A3ZYUE92RHyb-CyT3yihAok_Klh3_TgSA/s400/itninja.png" width="400" /></a></div>Piyush Nasahttp://www.blogger.com/profile/11750828958665245404noreply@blogger.com12tag:blogger.com,1999:blog-29452818.post-66203362880194628672012-06-13T21:50:00.000-07:002012-06-14T05:57:59.354-07:00Re-Packaging Apple Quicktime 7.72.80.56 and later versionsQuicktime comes as an EXE file which can be extracted easily with 7Zip. The three MSI I received were AppleApplicationSupport, AppleSoftwareUpdate and Quicktime. The Apple Update MSI can be discarded if you do not want to AutoUpdate your Quicktime.<br />
<br />
Apple Application Support MSI can be directly installed with /qb! switch.<br />
<br />
iTunes can be packaged separately and I have created a separate post for its customization:<br />
<a href="http://msiworld.blogspot.com.au/2012/06/re-packaging-apple-itunes-10617-and.html">http://msiworld.blogspot.com.au/2012/06/re-packaging-apple-itunes-10617-and.html</a>
<br />
<br />
Quicktime should be modified through Transform as follows:<br />
<br />
1) Change the following properties in your MST:<br />
<br />
SCHEDULE_ASUW =0<br />
REGSRCH_DESKTOP_SHORTCUTS =0<br />
REBOOT=ReallySuppress<br />
<br />
2) Install Quicktime on a test machine and do all the customizations you want with preferences. Once all customizations are complete, copy the quicktime.qtp file from "%userprofile%\AppData\LocalLow\Apple Computer\QuickTime\QuickTime.qtp"<br />
<br />
Add this file to Transform in C:\ProgramData\Apple Computer\QuickTime\QuickTime.qtp.<br />
<br />
Now add these two scripts in your package in Custom Action to run just before Install Finalize and with Condition as NOT REMOVE~="ALL"<br />
<br />
a) This script will copy the .qtp file to all the users profile.<br />
----------------------------------------------------------------------<br />
'Created by Piyush Nasa<br />
'Used to copy the config file to the current user\appdata\local directory. <br />
on error resume next<br />
Set oShell = CreateObject( "WScript.Shell" )<br />
userprofile=oShell.ExpandEnvironmentStrings("%USERPROFILE%")<br />
systemdrive=oShell.ExpandEnvironmentStrings("%SYSTEMDRIVE%")<br />
Set fso = CreateObject("Scripting.FileSystemObject")<br />
Set afile = fso.GetFile(systemdrive & "\ProgramData\Apple Computer\QuickTime\QuickTime.qtp")<br />
strDestination1 =userprofile & "\AppData\LocalLow\Apple Computer\QuickTime\QuickTime.qtp"<br />
<br />
fso.CreateFolder(userprofile & "\Application Data\LocalLow\Apple Computer")<br />
fso.CreateFolder(userprofile & "\Application Data\LocalLow\Apple Computer\QuickTime") <br />
afile.Copy(strDestination1)<br />
------------------------------------------------------------------------<br />
b) This script will create the registry key for every user.<br />
------------------------------------------------------------------------<br />
'Created by Piyush Nasa<br />
'Used to create HKCU registry to point to qtp file.<br />
Option Explicit<br />
Dim Temp<br />
'HKEY_CURRENT_USER = HKCU<br />
'HKEY_LOCAL_MACHINE = HKLM<br />
'HKEY_CLASSES_ROOT = HKCR<br />
'HKEY_USERS = HKEY_USERS<br />
'HKEY_CURRENT_CONFIG = HKEY_CURRENT_CONFIG<br />
Temp = WriteReg("HKCU\Software\Apple Computer, Inc.\QuickTime\LocalUserPreferences\FolderPath","%userprofile%\AppData\LocalLow\Apple Computer\QuickTime\","REG_SZ")<br />
<br />
Function WriteReg(RegPath, Value, RegType)<br />
'Regtype should be "REG_SZ" for string, "REG_DWORD" for a integer,…<br />
'"REG_BINARY" for a binary or boolean, and "REG_EXPAND_SZ" for an expandable string<br />
Dim objRegistry, Key<br />
Set objRegistry = CreateObject("Wscript.shell")<br />
Key = objRegistry.RegWrite(RegPath, Value, RegType)<br />
WriteReg = Key<br />
End Function<br />
---------------------------------------------------------------------------<br />
<br />
3) Add any HKCU registry key in a new component placed at the highest parent Feature. Set this as a keypath. This will ensure that the application is self healed when launched by the user.<br />
<br />
4) You will have to remove a Launch condition to check if the existing version is installed already, because I faced a problem and it was not uninstalling properly too with that condition being there. Though this step is optional.<br />
<br />
<strong>Please note</strong> that this package works fine when deployed/installed through any deployment tool in System context as it will trigger the self heal. If you have to manually install this application then you need to add the file the LOCALAPPDATAFOLDER manually in your transform.<br />
<br />
Hope this will expidite your packaging of Quicktime application.Piyush Nasahttp://www.blogger.com/profile/11750828958665245404noreply@blogger.com18tag:blogger.com,1999:blog-29452818.post-71754811236767561402012-06-13T19:46:00.000-07:002012-06-14T05:55:13.481-07:00Re-Packaging Apple iTunes 10.6.1.7 and lateriTunes comes as an EXE file which can be extracted easily with 7Zip. The five MSI I received were AppleApplicationSupport, AppleMobileDeviceSupport64, AppleSoftwareUpdate, Bonjour64 and iTunes64. The Apple Software Update MSI and Bonjour MSI can be discarded if you do not want to AutoUpdate your iTunes. Bonjour can be kept if you want to allow file sharing on your desktop fleet. We did not want this so we removed this MSI. If you want to install Bonjour then it can be installed silently with /qb! switch.<br />
<br />
From this Version QuickTime is not part of iTunes. QuickTime can be packaged separately. more details for packaging this is in this post:<br />
<a href="http://msiworld.blogspot.com.au/2012/06/re-packaging-apple-quicktime-7728056.html">http://msiworld.blogspot.com.au/2012/06/re-packaging-apple-quicktime-7728056.html</a>
<br />
<br />
Apple Application Support and Apple Mobile Device Support MSI can be installed silently with /qb! switch.<br />
<br />
You will have to customize iTunes by creating an MST file.<br />
<br />
1) Change the following Public Properties in the MST:<br />
DESKTOP_SHORTCUTS = 0<br />
DISABLEADVTSHORTCUTS = 0<br />
SCHEDULE_ASUW = 0<br />
AMDS_IS_INSTALLED = 1<br />
BONJOUR_IS_INSTALLED = 1<br />
REBOOT = ReallySuppress<br />
NO_ASUW = 0<br />
NO_BONJOUR = 0<br />
IAcceptLicense = Yes<br />
REGSRCH_DESKTOP_SHORTCUTS = 0<br />
<br />
2) Install iTunes on a test machine and make all the customizations you want. All the customizations will be stored in following files:<br />
<br />
a) "%userprofile%\AppData\Local\Apple Computer\iTunes\cache.db<br />
b) "%userprofile%\AppData\Local\Apple Computer\iTunes\iTunesPrefs.xml"<br />
c) "%userprofile%\AppData\Roaming\Apple Computer\iTunes\iTunesPrefs.xml"<br />
d) "%userprofile%\AppData\Roaming\Apple Computer\iTunes\Preferences\com.apple.iTunes.plist"<br />
e) "%userprofile%\AppData\Roaming\Apple Computer\iTunes\Preferences\keychain.plist"<br />
<br />
Copy these files in C:\ProgramData\Apple Computer\iTunes\ folder in your MST file and then use the below script to run in Custom Action just before InstallFinalize. Condition to be kept as NOT REMOVE~="ALL"<br />
<br />
<br />
'Created by Piyush Nasa<br />
'Used to copy the config file to the current user\appdata\local directory. <br />
on error resume next<br />
Set oShell = CreateObject( "WScript.Shell" )<br />
userprofile=oShell.ExpandEnvironmentStrings("%USERPROFILE%")<br />
systemdrive=oShell.ExpandEnvironmentStrings("%SYSTEMDRIVE%")<br />
Set fso = CreateObject("Scripting.FileSystemObject")<br />
Set afile = fso.GetFile(systemdrive & "\ProgramData\Apple iTunes\local\cache.db")<br />
strDestination1 =userprofile & "\AppData\Local\Apple Computer\iTunes\cache.db"<br />
Set bfile = fso.GetFile(systemdrive & "\ProgramData\Apple iTunes\local\iTunesPrefs.xml")<br />
strDestination2 =userprofile & "\AppData\Local\Apple Computer\iTunes\iTunesPrefs.xml"<br />
Set cfile = fso.GetFile(systemdrive & "\ProgramData\Apple iTunes\Roaming\iTunesPrefs.xml")<br />
strDestination3 =userprofile & "\AppData\Roaming\Apple Computer\iTunes\iTunesPrefs.xml"<br />
Set dfile = fso.GetFile(systemdrive & "\ProgramData\Apple iTunes\Roaming\Preferences\com.apple.iTunes.plist")<br />
strDestination4 =userprofile & "\AppData\Roaming\Apple Computer\iTunes\Preferences\com.apple.iTunes.plist"<br />
Set efile = fso.GetFile(systemdrive & "\ProgramData\Apple iTunes\Roaming\Preferences\keychain.plist")<br />
strDestination5 =userprofile & "\AppData\Roaming\Apple Computer\iTunes\Preferences\keychain.plist"<br />
<br />
fso.CreateFolder(userprofile & "\AppData\Local\Apple Computer")<br />
fso.CreateFolder(userprofile & "\AppData\Local\Apple Computer\iTunes") <br />
fso.CreateFolder(userprofile & "\AppData\Roaming\Apple Computer")<br />
fso.CreateFolder(userprofile & "\AppData\Roaming\Apple Computer\iTunes") <br />
fso.CreateFolder(userprofile & "\AppData\Roaming\Apple Computer\iTunes\Preferences") <br />
afile.Copy(strDestination1)<br />
bfile.Copy(strDestination2)<br />
cfile.Copy(strDestination3)<br />
dfile.Copy(strDestination4)<br />
efile.Copy(strDestination5)<br />
<br />
3) Add any HKCU registry key in a new component placed at the highest parent Feature. Set this as a keypath. This will ensure that the application is self healed when launched by the user.<br />
<br />
<strong>Please note</strong> that this package works fine when deployed/installed through any deployment tool in System context as it will trigger the self heal. If you have to manually install this application then you need to add the file the LOCALAPPDATAFOLDER manually in your transform.<br />
<br />
Hope this will expidite your packaging of iTunes application.Piyush Nasahttp://www.blogger.com/profile/11750828958665245404noreply@blogger.com25tag:blogger.com,1999:blog-29452818.post-66017107062178030302012-06-03T23:40:00.003-07:002014-11-12T18:16:39.127-08:00Packaging Google Chrome for Enterprise deploymentMany times it is an issue with the Administrators to deploy Google Chrome enterprise wide as there are lots of issues like:<br />
<br />
1) Many people would have already installed various other versions of Chrome either through MSI or through exe.<br />
2) How to customize Google chrome for enterprise wide deployment.<br />
<br />
*Edited: The new version has a few differences, please see the end of post on how to tackle this.*<br />
<br />
First, I would like to mention here that Google Chrome Enterprise version can be downloaded from the following location:<br />
<a href="http://www.google.com/intl/en/chrome/business/browser/">http://www.google.com/intl/en/chrome/business/browser/</a><br />
<br />
This site contains an MSI, which is already customized for business as in there are no desktop/Taskbar shortcuts and the application automatically goes to Program files folder.<br />
If you need to customize this, it is best to capture this MSI as it runs a Setup.exe from within.<br />
I would say that, this MSI is good enough to go like this too so not recommended to waste your time in capturing the MSI unless specifically required.<br />
<br />
You can add master_preferences file in the Google\Chrome\Application folder with following contents:<br />
<br />
{ <br />
"homepage" : "<a href="http://msiworld.blogspot.com/" target="_blank">http://msiworld.blogspot.com</a>", <br />
"homepage_is_newtabpage" : false, <br />
"browser" : { <br />
"show_home_button" : true,<br />
"check_default_browser" : false,<br />
"window_placement": {<br />
"bottom": 1000,<br />
"left": 10,<br />
"maximized": false,<br />
"right": 904,<br />
"top": 10,<br />
"work_area_bottom": 1010,<br />
"work_area_left": 0,<br />
"work_area_right": 1680,<br />
"work_area_top": 0<br />
}<br />
},<br />
"bookmark_bar" : { <br />
"show_on_all_tabs" : true <br />
}, <br />
"distribution" : { <br />
"skip_first_run_ui" : true, <br />
"show_welcome_page" : false, <br />
"import_search_engine" : false, <br />
"import_history" : false, <br />
"create_all_shortcuts" : true, <br />
"do_not_launch_chrome" : true, <br />
"make_chrome_default" : false <br />
}<br />
}<br />
<br />
If you add this, change the install sequence of Custom Actions which are already there in the MSI to run before InstallFiles action. That is, move InstallFiles Action after DoInstall. This will make sure your master_preferences file is retained till end.<br />
*Edited<br />
There are are 3 Custom Actions by the name starting from : CallUninstaller<br />
Change their condition to REMOVE="ALL"<br />
This will enable for a clean upgrade else you will face issues while upgrading the application.<br />
*<br />
<strong>Uninstall Any Previous Version of Chrome:</strong><br />
<br />
To Uninstall any previous version of Chrome, I have written this VBScript which can be run before the installation of your MSI.<br />
<br />
'==============================================================<br />
'Lines to get the computer Name<br />
Const HKEY_LOCAL_MACHINE = &H80000002<br />
Set wshShell = WScript.CreateObject( "WScript.Shell" )<br />
strComputerName = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" )<br />
dim folder, MyProperties, arrMyProperties, Exe, Param, oReg, strKeyPath, strValueName<br />
<br />
'==============================================================<br />
'To check whether the OS is 32 bit or 64 bit of Windows 7<br />
'==============================================================<br />
'Lines to detect whether the OS is 32 bit or 64 bit of Windows 7 <br />
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputerName & "\root\default:StdRegProv") <br />
strKeyPath = "HARDWARE\DESCRIPTION\System\CentralProcessor\0"<br />
strValueName = "Identifier"<br />
<br />
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue<br />
'==============================================================<br />
'Checking Condition whether the build is 64bit or 32 bit<br />
if (instr(strValue,"64")) then<br />
folder = "C:\Program Files (x86)\Google\Chrome"<br />
RegVal = ReadReg ("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome\UninstallString")<br />
End If<br />
if (instr(strValue,"x86")) then<br />
folder = "C:\Program Files\Google\Chrome"<br />
RegVal = ReadReg ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Google Chrome\UninstallString")<br />
End If<br />
'==============================================================<br />
<br />
MyProperties = RegVal<br />
arrMyProperties = Split(MyProperties, "-")<br />
Exe = arrMyProperties(0)<br />
Param = "--uninstall --multi-install --chrome --system-level --force-uninstall"<br />
'Uninstall Previous version Chrome<br />
'==============================================================<br />
wshShell.run Exe & Param, 1, True<br />
'Delete leftover folder and files from Previous version Chrome<br />
'==============================================================<br />
dim filesys<br />
Set filesys = CreateObject("Scripting.FileSystemObject")<br />
If filesys.FolderExists(folder & "\") Then <br />
filesys.DeleteFolder folder<br />
End If<br />
Function ReadReg(RegPath)<br />
Dim objRegistry, Key<br />
Set objRegistry = CreateObject("Wscript.shell")<br />
Key = objRegistry.RegRead(RegPath)<br />
ReadReg = Key<br />
End Function<br />
<br />
<br />
Hope these steps will reduce your efforts in deployment of Chrome.<br />
<br />
*<br />
<span style="background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;"><span style="font-size: x-small;"><span style="line-height: 18px;">With the New version 26.0.1410.64, Google has changed the install sequence. do the following:</span></span></span><br />
<br style="background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;" />
<span style="background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">1) In InstallExecuteSequence Table move InstallFiles action after DoInstall Custom Action. This DoInstall Custom Action is actually installing the Google Chrome from an exe. So if the MSI already had copied the master_preferences file, this exe will replace it with its own. If you place the InstallFile Action after DoInstall, then the file which you have added in your package will overwrite the one which Google provides.</span><br />
<span style="background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">2) You might have to write a small script to delete the shortcut from C:\Users\Public\Desktop, if you do not want a desktop shortcut.</span><br />
<span style="background-color: #fefdfa; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;">Place this CA at the end just before InstallFinalize.</span>Piyush Nasahttp://www.blogger.com/profile/11750828958665245404noreply@blogger.com76tag:blogger.com,1999:blog-29452818.post-31126667553315676662012-05-13T20:07:00.000-07:002012-05-13T20:07:21.244-07:00Installshield Build Error Code 0I was facing this issue with Installshield 2012 SP1. I had installed this product with AdminStudio 11.<br />
<br />
When I converted the MSI to .ism project through Installshield and then tried to build it back to MSI, I always got this error code 0.<br />
<br />
I could not find any documentation for this online so wrote back to Installshield Customer Support and they came up with this work around. Hope this will help you if you are facing this similar issue with your product. Do let me know by commenting if this has helped you. Just want to know how many people are affected by this,<br />
<br />
<br />
<span lang="EN-US" style="font-family: "Calibri","sans-serif"; mso-ansi-language: EN-US;">Within the .ism project:</span><span lang="EN-US" style="mso-ansi-language: EN-US;"> <o:p></o:p></span><br />
<br />
<span lang="EN-US" style="font-family: "Calibri","sans-serif"; mso-ansi-language: EN-US;">Go to the Direct Editor under the Additional Tools section.</span><span lang="EN-US" style="mso-ansi-language: EN-US;"> <br />
</span><span lang="EN-US" style="font-family: "Calibri","sans-serif"; mso-ansi-language: EN-US;">Select the InstallShield table.</span><span lang="EN-US" style="mso-ansi-language: EN-US;"> <br />
</span><span lang="EN-US" style="font-family: "Calibri","sans-serif"; mso-ansi-language: EN-US;">Change the SchemaVersion property from 772 to 771.</span><span lang="EN-US" style="mso-ansi-language: EN-US;"> <br />
</span><span lang="EN-US" style="font-family: "Calibri","sans-serif"; mso-ansi-language: EN-US;">Save, close, and reopen the project.</span><span lang="EN-US" style="mso-ansi-language: EN-US;"> <br />
</span><span lang="EN-US" style="font-family: "Calibri","sans-serif"; mso-ansi-language: EN-US;">InstallShield will prompt asking if you want to upgrade the project.</span><span lang="EN-US" style="mso-ansi-language: EN-US;"> <br />
</span><span lang="EN-US" style="font-family: "Calibri","sans-serif"; mso-ansi-language: EN-US;">Click Yes to upgrade the project.</span><span lang="EN-US" style="mso-ansi-language: EN-US;"> <o:p></o:p></span><br />
<br />
<span lang="EN-US" style="font-family: "Calibri","sans-serif"; mso-ansi-language: EN-US;">You should now be able to build the project without error.</span><span lang="EN-US" style="mso-ansi-language: EN-US;"> <o:p></o:p></span><br />
<br />
<br />
Apprantly this is the issue with this release of the product only and it has been fixed with the later releases.<br />Piyush Nasahttp://www.blogger.com/profile/11750828958665245404noreply@blogger.com4tag:blogger.com,1999:blog-29452818.post-11205638290935479372012-04-27T02:22:00.000-07:002012-05-31T22:48:56.540-07:00VBScript to Determine 32-bit or 64-bit machineOften we come across a situation where we need to see the Operating system bit information and then install application or do any customization. Here is a script which I use for this purpose:<br />
<br />
<br />
'===============================================================<br />
<br />Const HKEY_LOCAL_MACHINE = &H80000002<br />
'Lines to get the computer Name<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Set wshShell = WScript.CreateObject( "WScript.Shell" )<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>strComputerName = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" )<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<br />
'===============================================================<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>'To check whether the OS is 32 bit or 64 bit of Windows 7<br />
'===============================================================<br />
<br />
'Lines to detect whether the OS is 32 bit or 64 bit of Windows 7<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputerName & "\root\default:StdRegProv") <br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>strKeyPath = "HARDWARE\DESCRIPTION\System\CentralProcessor\0"<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>strValueName = "Identifier"<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue<br />
'===============================================================<br />
<br />
'Checking Condition whether the build is 64bit or 32 bit<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if (instr(strValue,"64")) then<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>'Perform functions for 64-bit OS.<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>End If<br />
<br />
if (instr(strValue,"x86")) then<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>'Perform functions for 32-bit OS<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>End If<br />
'===============================================================<br />
<div>
<br /></div>Piyush Nasahttp://www.blogger.com/profile/11750828958665245404noreply@blogger.com2tag:blogger.com,1999:blog-29452818.post-52512415569929203172012-04-19T00:17:00.003-07:002012-04-19T00:19:09.568-07:00VBScript to determine Root DriveAs per best practices we should not hard code the Root Drive in our package. If your package goes to multiple machines having different Root Drives, then you can use this simple VBScript in your package as Custom Action and it will set the Root Drive automatically for that machine.<br />
This script picks up the Root Drive from where Program Files folder is installed.<br />
<br />
<div>
Set oshell=CreateObject("Wscript.shell")<br />prog=oshell.ExpandEnvironmentStrings("%ProgramFiles%")<br />vletter=Split(prog,":")<br />dletter=vletter(0)
& ":\"<br />session.property("ROOTDRIVE")=dletter</div>Piyush Nasahttp://www.blogger.com/profile/11750828958665245404noreply@blogger.com0tag:blogger.com,1999:blog-29452818.post-89694352606277053382012-04-11T23:50:00.000-07:002012-04-17T16:29:17.868-07:00Installation and Uninstallation of MSU in silent modeMSU are the Microsoft Update files. <br />
You can easily install the MSU file silently without reboot with the following command line:<br />
<br />
<br />
<span style="font-family: Courier New;">wusa.exe Windows6.1-KB123456-x86.msu /quiet /norestart</span><br />
<br />
To Uninstall it Silently you need to follow this simple procedure:<br />
<br />
1) Run this command:<br />
<span class="userInput">expand c:\temp\Windows6.0-KB123456-x86.msu –F:Windows6.0-KB123456-x86.xml c:\temp</span><br />
<br />
<span class="userInput">2) This will create an XML file in temp folder as per the name above.</span><br />
<span class="userInput">Edit this xml in notepad.</span><br />
<br />
<span class="userInput">3)Find the <b>assemblyidentity</b> tag. Then, note the values of the following attributes:</span><br />
<ul>
<li>The <b>name</b> attribute</li>
<li>The <b>publickeytoken</b> attribute</li>
<li>The <b>processArchitecture</b> attribute</li>
<li>The <b>version</b> attribute</li>
</ul>
4) Use the below command to uninstall the MSU from your machine.<br />
<span class="userInput">start /w pkgmgr /up:<var>name</var>~<var>publickeytoken</var>~<var>processArchitecture</var>~~<var>version</var></span><br />
<br />
<span class="userInput"><var>Note: The variables above need to be replaced by the vaules you have copied in step 3.</var></span><br />
<br />Piyush Nasahttp://www.blogger.com/profile/11750828958665245404noreply@blogger.com7