Posts

Creating a SendTo Shortcut through MSI

If you want to create a SendTo shortcut through MSI, then if you just add the shortcut in MSI in SendTo folder, it will not work. Even if you get the shortcut there in every user profile, still it will not work. To make a SendTo shortcut, you need to create it on the fly, which means that shortcut should be created from original exe. To solve this issue for one of my application, WinSCP, I wrote the below VBScript and placed it in %ALLUSERPROFILE%\WinSCP folder. Then I created an Active setup to call this VBScript. Set Shell = CreateObject("WScript.Shell") ShortcutPath = Shell.SpecialFolders("SendTo") Set link = Shell.CreateShortcut(ShortcutPath & "\WinSCP (for upload).lnk") link.Arguments = "/upload" link.Description = "WinScp" link.HotKey = "" link.IconLocation = "C:\Program Files (x86)\WinSCP\WinSCP.exe,0" link.TargetPath = "C:\Program Files (x86)\WinSCP\WinSCP.exe" link.WindowStyle = 3 link.WorkingD...

VBScript to Kill a Process

This worked great for me. Just use as function and kill as many processes as you like. KillProc "abc.exe" Sub KillProc( myProcess )     Dim blnRunning, colProcesses, objProcess     blnRunning = False     Set colProcesses = GetObject( _                        "winmgmts:{impersonationLevel=impersonate}" _                        ).ExecQuery( "Select * From Win32_Process", , 48 )     For Each objProcess in colProcesses         If LCase( myProcess ) = LCase( objProcess.Name ) Then             ' Confirm that the process was actually running             blnRunning = True ...

VBScript to enable "Use this connection's DNS Suffix in DNS registration" in IPV4

I have written this below VBScript to enable "Use this connection's DNS Suffix in DNS registration" in IPV4 Advanced Settings. For Desktop adaptor, this (to enable "Use this connection's DNS Suffix in DNS registration" in IPV4) can be fixed by changing the registry value of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces\ NetworkInterfaceID \RegisterAdapterName to 1 Here NetowrkInterfaceID is a unique ID for every user and this can be obtained from "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\8\ServiceName" key. The issue is there can be multiple Network adaptors connected to the machine like Network adaptor for Desktop, Wireless Adaptor, VMware adaptor etc and they all are stored under different hive, like 8, 12, 14 etc. Hence I have written a script which will check for all this and will change the value for all adaptors. If you want for only one particular adaptor, you can modify...

How to make an MSI with some files compressed in Cabinet file and other uncompressed outside the MSI

This is a very interesting feature in MSI and I would like to explore and explain this for your knowledge and benefit. Word Count generally known as Word Count Summary property. This is a mandatory Summary property in MSI and can be changed from your WSI. Please note that this property is not in Property table but is in Summary table. This property has a different meaning for MSI, Transforms and Patch. This property is a bit feild. There are 4 bits which can be set or unset as in 0 or 1. eg. 01 Here is the description for these bits: --------------------------------------------------------------------------------- Bit 0 0 Long file names. 1 Short file names. --------------------------------------------------------------------------------- Bit 1 0 Source is uncompressed. 2 Source is compressed. --------------------------------------------------------------------------------- Bit 2 0 Source is original media. 4 Source is a administrative image created by an administrative installation. -...

Packaging Mozilla Firefox

Most people dread while packaging Mozilla Firefox application and mostly try to make a silent installation of it. I was recently given task to package the latest Mozilla Firefox application. The same procedure can be used for version 10.0.1, 11, 12 and 13, 14 and 15 as well as I have tried and it works fine for all of these. I would like to share here how I could easily package it. Also by this method you will be able to do Proxy server settings. First step is to do a Setup capture of the source exe which can be downloaded from Mozilla’s website. Take care that you do not have to launch the application after the installation is completed. Second Step is to copy 3 files as stated below. You can add these files in your .wsi directly after the setup capture. These 3 files will solve all your issues. 1. Mozilla.cfg : This file needs to be added to "%programfiles%\Mozilla Firefox\" folder and should have this content: //Firefox Default Settings // set Firefox Default homepage pref...

My First Powershell script

Seems that Powershell is the way to go forward as it is well supported with Windows 7 and Microsoft. It is a powerful script. I think it will revolutionize the way we script today. I just wrote my first powershell script and thought it would be good to share with all. I am not going to give any tutorial for Powershell as there are a lot of them available. There are a few things which are worth noting in this script: 1) You can get the script directory from the below script in Get-ScriptDirectory function. 2) You can suppress the remote exe installation prompt by command: $env:SEE_MASK_NOZONECHECKS = 1 code Remove-Item env:\SEE_MASK_NOZONECHECKS 3) Installation of setup.exe with parameters can be seen in function InstallPackage 4) Permissions can be set in Powershell script using the GivePermissions function below. Here is the code: ------------------------------------------------------ function Get-ScriptDirectory { $Invocation = (Get-Variable MyInvocation -Scope 1).Value Split-Path $I...

App-V for Royalblue Fidessa application

I want to document the OSD file for Royalblue Fidessa Application here as other capture done alone does not make the virtualized package work. There were certain client customizations which were required and I had to do them in the OSD file. Here is the OSD file which I used: <?xml version="1.0" standalone="no"?> <SOFTPKG GUID="XXXX-XXX-XXXX-XXXX" NAME="Fidessa" VERSION="6.3.9.61056"> <IMPLEMENTATION> <CODEBASE HREF="FILE://%SFT_SOFTGRIDSERVER%\SCCMData\Royalblue_Fidessa_6.7.0b_VFS_v1.0\Royalblue_Fidessa_6.7.0b_VFS_v1.0.sft" GUID="8XXX5-8XX0-4XX7-AXX1-5171XXXXXA0" PARAMETERS="" FILENAME="%CSIDL_PROGRAM_FILES%\royalblue\fidessa\FtwLaunch.exe" SYSGUARDFILE="Royalblue_Fidessa_6.7.0b_VFS_v1.0\osguard.cp" SIZE="15076089"/> <VIRTUALENV TERMINATECHILDREN="FALSE"> <POLICIES> <LOCAL_INTERACTION_ALLOWED>TRUE</LOCAL_INTERACTION_ALLOWE...