Posts

Showing posts with the label VB script

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

Repackaging Microsoft Visual Studio 2010 Pro (Or any other version)

There are a lot of sites referring the installation of Microsoft Visual Studio 2010 in silent mode, but if you have a closer look, no one gives the complete information on the installation and Un-installation of the package. Here are the steps which I followed to install Visual Studio on 32 bit as well as 64 bit machines. I assure you that you can save atleast 1 to 2 man days by taking information from here before proceeding with your packaging. Copy the compete source to a directory and name this directory as per your standard naming convention. Copy these files to this main directory (Explanation and details also provided later) VS2010_Uninstall-RTM.ENU.exe Dfusrprf.xml User.vbs Arpsuppress64.reg Arpsuppress32.reg Arpsuppresswow64.reg ConfigurationFile.ini Setup.vbs Uninstall.vbs Uninstall.bat These files are the complete list of files which will do the trick to install and un-install the MS Visual Studio 2010 package. You can use WISE Script Editor to create an exe for most of the p...

Using VBScript to Set Properties in MSI

We can easily use Set Property Custom Action to set Windows Installer Property, but sometimes we wish to set the property directly in VbScript, specially if we are taking an input from a user through VBScript. Hope this tip helps. To set property through VBScript we can use "Session" object like: Session.Property("ALLUSERS")="1" or we can directly use Property keyword like: Property("REBOOT")="ReallySuppress" The only catch here is that we cannot set INSTALLDIR property through the above method as the package uses Directory table to store the value of INSTALLDIR. We need to write the below VBScript to set INSTALLDIR: dim instpath instpath = "C:\newpath\newfolder" Session.TargetPath("INSTALLDIR")=instpath Remember to place this Custom Action after CostFinalize if you are changing the value of INSTALLDIR property in UI Sequence.