Posts

Uninstall Fonts through VBScript

I 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. 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. 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. This script will work for both 32-bit an 64-bit machines. 'Script to Delete Font 'Created by: Piyush Nasa 'Date: 21...

Citrix Receiver upgrade and double icon issue

I recently had to upgrade Citrix Receiver for one of my clients and I faced numerous issues during the install. 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. While Citrix Receiver can be installed with the following command: CitrixReceiver.exe /silent /noreboot /includeSSON ENABLE_SSON=Yes ALLOWADDSTORE=N ALLOWSAVEPWD=S 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. 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. The stores are created in the below registry key: HKCU\Software\Citrix\Dazzle When I removed this for the user and i...

How to uninstall any version of Java

I 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. 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. 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 ) 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 )

VBScript to change the proxy settings if disconnected from VPN

When connected to VPN, user's IE proxy settings get changed and is forced by VPN. 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. I have written a VBScript to change the proxy settings of the users. This script can be made a shortcut and then used. 'Script Created by Piyush Nasa 'Script to change Proxy settings for user if disconnected from VPN Option Explicit Dim valUserIn Dim objShell, RegLocate, RegLocate1 Set objShell = WScript.CreateObject("WScript.Shell") On Error Resume Next valUserIn = MsgBox("If you have been disconnected from VPN and want to reset your proxy, click Yes and restart Internet Explorer",4,"Proxy Reset") If valUserIn=vbYes Then RegLocate = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer" objShell.RegWrite RegLocate,"","REG_SZ" RegLocate = "HKEY_CURRENT_U...

Apple Inc

Image
Apple Inc. formerly   Apple Computer, Inc.,   is an   multinational corporation   headquartered in Cupertino ,   California , with a focus on designing, manufacturing, and selling consumer electronics and computer software products ( www.apple.com ). Apple Inc. was originally founded in 1976 as Apple Computer, Inc. but recently changed its name to Apple Inc. in January of 2007 ( www.apple.com ). Apple Inc. is consistently introducing new technology with an array of electronic products available.  Many of their most recognizable products include the Macintosh desktops and portable computers,  Mac OS X  operating systems, the  iPod  music player, as well as the iTunes store, the iPhone smartphone, and additional professional software applications ( www.apple.com ).   From the articles and information, I have done some analysis and evaluations. In my analysis, I have related the case to three concepts which are concept of demand and ...

Packaging Skype with Auto Update disabled

EDITED: 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. Recently while packaging Skype for enterprise version, I could not disable the Auto Updates and finally found a way to get rid of it. You can get the latest version of Skype setup in MSI format from the following URL: http://download.skype.com/msi/SkypeSetup.msi  or http://www.skype.com/go/getskype-msi 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. 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. I just removed this service and updater.exe file...

How to clear App-V Cache

This 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. I used one of the method used here and it worked for me. I want to share this link with all and want to bookmark it for myself for future reference. http://esense.be/33/2010/04/15/softgrid-clear-the-appv-cache/ In Summary, these are a few good options to start with: First, get a list of all AppV applications: sftmime query obj:app /short Remove all applications from the cache: sftmime.exe remove obj:app /global /complete Remove a specific application from the cache: sftmime.exe remove app:”applicationName” /complete Hope your issues are solved with this as well.

App-V with Java/JRE/JDK

It is very critical to understand how to handle installation of Java related applications in App-V environment. 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. Here is how you can do both of these in a proper way: 1) Java installed locally on the machine: 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. 2) Java is installed as local copy in...

Detection Method for MSU in Applications for SCCM 2012

In SCCM 2012 Applications you can have a detection method set for MSU with KB numbers. You can use the Powershell or VBScript to do this. Here is an example of both. Powershell Script: get-hotfix | Where-Object {$_.HotFixID -match "KB981603"} VBScript: 'Returns info if Windows 'KB981603'  in installed ' ----------------------------------------------------------' Option Explicit Dim objWMIService, strComputer strComputer = "." 'Run the query Set objWMIService = GetObject("winmgmts:" _     & "{impersonationLevel=impersonate}!\\" _     & strComputer & "\root\cimv2")   Dim QFEs Dim QFE Set QFEs = objWMIService.ExecQuery ("Select * from win32_QuickFixEngineering where HotFixID like 'KB981603'") For Each QFE in QFEs     Wscript.echo "Update KB981603 was installed by " & QFE.InstalledBy & " on " & QFE.InstalledOn Next WScript.Quit

VBScript to Delete Registrly key and all subkeys

This script has worked good for me and I would like to share with all. Option Explicit     Dim intHive     Dim strComputer     Dim strKeyPath, objRegistry     Const HKEY_CLASSES_ROOT        = &H80000000     Const HKEY_CURRENT_USER    = &H80000001     Const HKEY_LOCAL_MACHINE    = &H80000002     Const HKEY_USERS        = &H80000003     Const HKEY_CURRENT_CONFIG    = &H80000005     'On Error Resume Next     strComputer            = "."     intHive                = HKEY_LOCAL_MACHINE       strKeyPath            = "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ABC\XYZ"     Set objRegistry        = GetObject("winmgmts:\\" & strComputer & "\...

VBScript to Delete Folder and all SubFolders with files

Here is the VBScript which will delete all Folders and Subfolders with even have files in it. 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 I just want to keep this for my reference and for everyone so that we all can save some time. Option Explicit Dim objFSO, objTempFolder, strTempFolder Const TEMP_FOLDER = 2 Set objFSO        = CreateObject( "Scripting.FileSystemObject" ) Set objTempFolder = objFSO.GetSpecialFolder( TEMP_FOLDER ) strTempFolder     = objTempFolder.Path DelTree strTempFolder, True Sub DelTree( myFolder, blnKeepRoot ) ' With this subroutine you can delete folders and their content, ' including subfolders. ' You can specify if you only want to empty the folder, and thus ' keep the folder itself, or to delete the folder itself as well. ' Root directories and some (not all)...

Permissions to registry using setacl

Recently 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. 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. You can download SetACL from  http://helgeklein.com/download/ Here is an example to run SetACL to give registry permissions. "SetACL.exe" -on "hkcr\Interface" -ot reg -actn setowner -ownr "n:Administrators" "SetACL.exe" -on "hkcr\Interface" -ot reg -actn ace -ace "n:Users;p:full" Object name (-on) : This is the path to the object SetACL should operate on (file/directory/registry key/network share/service/printer). Object type (-ot) : What kind of object does the object name refer to: file or directory (file), registry key (reg), service (srv), printer (prn), network share (shr)? Action (-actn) : What...

Install MSP file with MSI

While handling with MSP of applications, sometimes a question comes in mind that can an MSP be installed along with MSI? The answer is yes, but with a few conditions involved. The conditions are explained later in the post with some description. First I will give you the command line to install MSP along with MSI: msiexec /i {Path to MSI}\Installer.MSI PATCH={Path to MSP}\Patch.MSP /qb If there is a transform as well to add you can include it in the command line as well. msiexec /i {Path to MSI}\Installer.MSI TRANSFORMS={Path to Transform}\Transform.MST PATCH={Path to MSP}\Patch.MSP /qb 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. Relative paths do not work in this case. This will apply the patch as in the updated files will be installed from the patch rather than from the MSI. This process is greatly useful when there are a lot of patches to be applied to an MSI. There might be cases that the MSI is alrea...

Error installing MSI from USB/DVD

Image
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. While installing the package, I got this error in the log files:   MSI (s) (44:C4) [14:06:35:318]: Source is incorrect. Volume label should be   but is SMSBOOT. MSI (s) (44:C4) [14:06:46:956]: Source is incorrect. Volume label should be   but is SMSBOOT.   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. 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.     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”. I removed the label from my USB drive and kept...

Subinacl to give permissions to registry/Files

Subinacl is a useful utility to give permissions to registries. Here is a simple example how to give permissions to registry. subinacl.exe /subkeyreg HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Optika /grant=administrators=f /grant=system=f /grant=users=f /setowner=administrators >> %temp%\subinacl_output.txt /keyreg HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Optika /grant=administrators=f /grant=system=f /grant=users=f /setowner=administrators >> %temp%\subinacl_output.txt Subinacl can be downloaded from net. More detailed Usage as per your requirements. This contains lots of features. You can write your comments on what you used and if it worked. Help others by posting your real time examples. Usage :      SubInAcl [/option...] /object_type object_name [[/action[=parameter]...] /options    :     /outputlog=FileName                 /errorlog=FileName ...