Showing posts with label Environment Variables. Show all posts
Showing posts with label Environment Variables. Show all posts

19.11.14

Export all the Environment Variables to a file

Steps to Export all your Environment Variables to a file. This will be helpful in corporate environments, where we dont have admin rights to browse/update Environment variables

1. Open cmd prompt.
2. Type in C:> set >> allenvvar.txt

The file will be created in the C drive

Voila!

BAT to launch applications with specific Environment Variables

Often you end up in situations, where after installing some software, your previous ones stop working; or the new ones dont work as they should as previous ones are interfering. One of the reasons for this issue could be the environment variables being set and used by such software. And this always happens when you have QTP [along with java add-in] installed, which causes other java-based software to just not launch/start altogether.
To overcome this issue of same environment variables being used by different programs, we can create a .BAT file to temporarily set and launch/start the applications with those environment variables.

This below code will help launch DBArtisan [database client] by setting up the environment variables required for it, some of which have been hijacked by QTP.
We can write similar stuff for any application we want.

-----------------------------------------------
Set SYBASE=C:\Progra~2\Syb155

Set SYBASE_OCS=OCS-15_0

Set INCLUDE=C:\Progra~2\Syb155\OCS-15_0\include;%INCLUDE%

Set LIB=C:\Progra~2\Syb155\OCS-15_0\lib;%LIB%

Set PATH=C:\Progra~2\Syb155\OCS-15_0\bin;C:\Progra~2\Syb155\OCS-15_0\dll;C:\Progra~2\Syb155\OCS-15_0\lib3p;%PATH%

Set PATH=C:\Progra~2\Syb155\DataAccess\OLEDB\dll;%PATH%

Set PATH=C:\Progra~2\Syb155\DataAccess\ODBC\dll;%PATH%

Set LIB=C:\Progra~2\Syb155\DataAccess\ADONET\dll;%LIB%

Set PATH=C:\Progra~2\Syb155\DataAccess\ADONET\dll;%PATH%


Start C:\Progra~2\Enbarcadero\dbart901_11364_ion.exe

-----------------------------------------------