Windows7bugs | Script Copying Instructions

November 9, 2014

Hello guys

Once in a while we receive complaints about scripts copied from our blog causing issues. We regret those issues and apologizing to everyone who suffered due to. Our blog is totally free until date and unfortunately, different browsers behave differently while parsing the code tags.

We were using

 [ code ] [ /code ]

tag for long time, found that few scripts getting totally messed up with double quotes being showsn and &quote etc. This has forced us to start using

[ sourcecode ] [ /sourcecode ] 

and realized if we have more than one block of scripts, the 2nd and consecutive scripts blocks being totally garbled.

With reference to above said, we request you to kindly make sure that the scripts those you copy from our posts are thoroughly checked for special characters prior applied. Especially registry related scripts as such attempts could completely wreck your Windows registry databases.

We hope you read us clearly and continue supporting us.


Oracle 10g | Get Windows User Details from Active Directory

December 9, 2014

Hello guys! 9th December 2014 : Minor update The following exercise will not materialize if you have a middleware sever, as the client information will not be available for your forms. Missed us? :) Recently we were challenged with a very interesting task, and that was to send emails to the requester of a particular activity once after the completion. Usually, we can look into the HR/Payroll enrollments and get the email address for the user without much troubles. Our case was different, our HR/Payroll records are not always up to date and we were forced to capture the Windows login name and get the email addresses straight away from the AD database! As usual, after hours of googling and trying out few scripts, We came up with a tailored script that fetches us the full Name and email address against value derived from

Select sys_context('userenv','os_user') from dual;

query Here, we are sharing the scripts with you Complete credits go to the following few & many others (Our script is a complete rip-off from article)

/* Formatted on 12/9/2014 2:56:10 PM (QP5 v5.163.1008.3004) */
   /*This block commented never worked for us
      -- Adjust as necessary.
      --   l_ldap_host    VARCHAR2(256) := '';
      --  l_ldap_port    VARCHAR2(256) := '389';
      --  l_ldap_user    VARCHAR2(256) := 'cn=orcladmin';
      --  l_ldap_passwd  VARCHAR2(256) := 'password';
      --  l_ldap_base    VARCHAR2(256) := 'cn=Users,dc=tshcomputing,dc=com';
   --Active Directory Component Windows 2008 R2
   l_ldap_host     VARCHAR2 (256)
                      := 'fully qualitifed name of your domain controller'; --eg (
   l_ldap_port     VARCHAR2 (256) := '389';
   l_ldap_user     VARCHAR2 (256) := 'fully qualified user name'; --eg: (make sure paul is a member of Administrators group)
   l_ldap_passwd   VARCHAR2 (256) := 'password'; -- clear text password for user
   l_ldap_base     VARCHAR2 (256) := 'DC=xyz,DC=com';
   -- l_ldap_base     VARCHAR2 (256) := 'OU=GEN Managers,DC=xyz,DC=com'; --Restrict the query to a particular OU within AD
   --AD 2008 R2
   l_retval        PLS_INTEGER;
   l_session       DBMS_LDAP.session;
   l_attrs         DBMS_LDAP.string_collection;
   l_message       DBMS_LDAP.MESSAGE;
   l_entry         DBMS_LDAP.MESSAGE;
   l_attr_name     VARCHAR2 (256);
   l_ber_element   DBMS_LDAP.ber_element;
   l_vals          DBMS_LDAP.string_collection;
   -- Choose to raise exceptions.
   -- Connect to the LDAP server.
   l_session := DBMS_LDAP.init (hostname => l_ldap_host, portnum => l_ldap_port);
   l_retval :=
      DBMS_LDAP.simple_bind_s (ld       => l_session,
                               dn       => l_ldap_user,
                               passwd   => l_ldap_passwd);
   -- l_attrs(1) := '*'; -- Get all attributes(Complete AD details will be read, use carefully)
   l_attrs (1) := 'mail';
   l_attrs (2) := 'displayName';
   --Common Attributes you can pass to the AD query
   --  l_attrs(1)  := 'sAMAccountName';
   --   l_attrs(2)  := 'employeeNumber';
   --    l_attrs(3)  := 'displayName';
   --    l_attrs(4)  := 'description';
   --    l_attrs(5)  := 'telephoneNumber';
   --    l_attrs(6)  := 'facsimileTelephoneNumber';
   --   l_attrs(7)  := 'department';
   --   l_attrs(8)  := 'company';
   --    l_attrs(9)  := 'employeeID';
   --   l_attrs(10) := 'streetAddress';
   --   l_attrs(11) := 'mail';
   --   l_attrs(12) := 'c';
   --  l_attrs(13) := 'l';
   --   l_attrs(14) := 'postalCode';
   -- retrieve all attributes
   l_retval :=
      DBMS_LDAP.search_s (ld         => l_session,
                          base       => l_ldap_base,
                          scope      => DBMS_LDAP.SCOPE_SUBTREE,
                          --          filter   => 'objectclass=*', --All the objects will be read
                          filter     => 'sAMAccountName=paul', --Record for User with windows login account as "Paul" will be fetched
                          attrs      => l_attrs,
                          attronly   => 0,
                          res        => l_message);
   IF DBMS_LDAP.count_entries (ld => l_session, msg => l_message) > 0
      -- Get all the entries returned by our search.
      l_entry := DBMS_LDAP.first_entry (ld => l_session, msg => l_message);
      WHILE l_entry IS NOT NULL
         -- Get all the attributes for this entry.
         DBMS_OUTPUT.PUT_LINE ('---------------------------------------');
         l_attr_name :=
            DBMS_LDAP.first_attribute (ld          => l_session,
                                       ldapentry   => l_entry,
                                       ber_elem    => l_ber_element);
         WHILE l_attr_name IS NOT NULL
            -- Get all the values for this attribute.
            l_vals :=
               DBMS_LDAP.get_values (ld          => l_session,
                                     ldapentry   => l_entry,
                                     attr        => l_attr_name);
            FOR i IN l_vals.FIRST .. l_vals.LAST
               DBMS_OUTPUT.PUT_LINE (
                     'ATTIBUTE_NAME: '
                  || l_attr_name
                  || ' = '
                  || SUBSTR (l_vals (i), 1, 200));
            END LOOP values_loop;
            l_attr_name :=
               DBMS_LDAP.next_attribute (ld          => l_session,
                                         ldapentry   => l_entry,
                                         ber_elem    => l_ber_element);
         END LOOP attibutes_loop;
         l_entry := DBMS_LDAP.next_entry (ld => l_session, msg => l_entry);
      END LOOP entry_loop;
   END IF;
   -- Disconnect from the LDAP server.
   l_retval := DBMS_LDAP.unbind_s (ld => l_session);
   DBMS_OUTPUT.PUT_LINE ('L_RETVAL: ' || l_retval);

Try it & let us know the experiences! regards,

Do you want to learn & C# along with us?

December 7, 2014

Greetings from Kuwait guys!

Whole the last many years we were mostly concentrating on Oracle related technologies, as we mostly use those technologies at work. Right now we are planning to shift our main business application to something that is built solely using Microsoft development platform .Net & starting a new category adhering to the same.

We are not at all experts in this development platform, however, as we “hacked” the Oracle technologies for our requirements, will keep on trying to do the same with our relatively new challenge .Net!

Stay tuned, we are sure, we will amuse with our experiments :)


for Windows7bugs


How to get a computer by computer view of installed software using the MAP toolkit

November 23, 2014

As an Administrator maintaining Windows domains, one of the herculean tasks usually one run into is to make a software asset inventory. There are plenty of excellent software to do the job for you, obviously for some cost.

Here we are suggesting you a cheaper alternative, using Microsoft’s own MAP toolkit. Be ready to sweat a bit, and we are sure you would love the outcome.

The entire write up is copied from Microsoft blog and tested by us for assuring, if you follow the instructions as given, within few hours of time you will have a neat software inventory list.

The original link is here

One of the most frequent questions we get at is how to get a list of the software discovered by the MAP toolkit on a computer by computer basis.  Most of the users who ask are using this to help them answer a licensing question but it can be used in a number of other scenarios as well for example Software Asset Management or user profiling for VDI (see

In MAP 7.0, provided this information through a database view and Microsoft Excel.  The name of the view is InstalledProducts_view.

In MAP 8.0, this view has been renamed to [UT_WinServer_Reporting].[InstalledProductsView].

This view contains several key pieces of information that you can use to do a number of things including:

  • Understand what applications and versions are installed throughout your organization
  • See the Operating Systems on which these apps are running and whether the machine is physical or virtual
  • See who is using the machines on which the apps are running
  • Get important license related information such as processor counts, total cores and logical processor counts

To get started, you will need to open Excel and connect to your local SQL Server database that is storing the MAP data that you want to view.  There are two different ways to connect, depending on the version of SQL Server that you are using.

Using your own SQL Server instance

If you are using your own instance (the non-default MAP install), you will select the Data option on the Excel ribbon and select the ‘From other sources’ option.  Then select ‘From SQL Server’.


Enter your server name and instance name and click ‘Next’.


Select the database that contains the data you want and then pick InstalledProducts_view row under ‘Name’ for databases created with MAP 7.0.

For MAP 8.0, use [UT_WinServer_Reporting].[InstalledProductsView].


You can also add some additional information to help describe the connection.  Then click ‘Finish’ and select the location where you want the query results to populate.


Using the default (LocalDB) instance

In MAP 7.0, the default database installed moved to SQL Server 2012 LocalDB.  There are a couple of steps that are different than those used in other versions of SQL Server.

First, make sure that you have the SQL Server 2012 Native Client installed.  You can get it from

With Excel open and the Data ribbon highlighted, select the ‘From other data sources’ option and select ‘From Data Connection Wizard’


Select the ‘Other/Advanced’ option.


Then select the option for SQL Server Native Client 11.0 as highlighted below.  If this option is not available, make sure that you have the native client installed –


Next, you enter in the server name.  If you are using the default install the server name will be: (localdb)\maptoolkit.

Set the option in #2 to Use Windows NT Integrated Security

Hit ‘Test Connection’


If you’ve done it correctly, you will get a success message!


Then follow the same steps as above where you select the database name and the InstalledProducts_view for 7.0.  For 8.0, use [UT_WinServer_Reporting].[InstalledProductsView].

Populate the results in your spreadsheet!

What do I do next?

Well – that is entirely up to you.  One thing that we like to do is to create a pivot table and drill down into this information. Here is one that I created.  I filtered down the application name to include only those that had SQL Server components.  I could look at this by physical/virtual and by operating system.

Pretty cool – huh!


As a reminder, here is a link to some valuable MAP community supported content.


Install Oracle 10g ( onwards) on Windows 10 (Technical Preview)

October 6, 2014

We know it is too early, still as usual we are kicking in once again trying to install Oracle 10g onwards databases on an OS that’s in the early stages of testing/improvements.

If you are wondering whether Oracle 10g ( onwards) could be installed on Windows 10 (TP), the shortest answer is yes and as usual the earlier hacks what we specified with are still valid for the installation on Windows 10 TP

All you need to do is to add an entry to the refhost.xml file like following:

<!–Microsoft Windows Vista–>
<!–Microsoft Windows 7–>
<!–Microsoft Windows 8–>
 <!–Microsoft Windows 10–>
      <VERSION VALUE=”6.4″/>

You may safely ignore the warnings (if any) and proceed with the Installation. Please note, as usual we warn you not to install unsupported databases on newer Operating Systems as you may risk with your valued data. Below, few screen shots from our installation attempt which was successful.




You will be prompted to install .NET Framework 3.5 (That includes .NET 2.0 and 3.0), and we suggest you install it for better stability of the database





That’s all folks

for Windows7bugs


Install Windows 10 Technical Preview on Oracle Java VirtualBox

October 2, 2014

This is our first post after months long break. As Microsoft has released the technical preview for their forthcoming OS “Windows 10” we are once again engaging ourselves to try out “Uncertified” Oracle products over a possibly half cooked OS in the preview state.


Host: Windows 8.1 64Bit Professional

Intel i5, 8GB Memory, 1TB HDD (Dell E6420 14” laptop)

Java VirtualBox 4.3.16 r95972


We will try explain how to install Windows 10 Technical Preview on VirtualBox in next few steps

Windows 8.1 comes with Hyper-V enabled default. If you are planning to try out the 64Bit version of technical preview, make sure you disable Hyper-V from “Windows features”


Uncheck the Hyper-V & restart the computer when prompted.

In order to download the Technical preview you must signup for Windows Insider Program (

We are sure, if you are an enthusiast wanting to try out the preview, you are already a half geek, who knows how to signup something very straight forward like “Windows Insider”

Download your choice of technical preview, 32Bit or 34Bit ISO file. The file is on disk is 3.81GB, so if you have a slow connection, start download, have a nap. We are on a 12MBPS fiber connection and it took around 50 minutes for the download to finish!


Start Oracle VirtualBox now


Create a new Virtual Machine (Follow the images)


Based on available memory on your computer, setup the maximum memory you can allocate for the VM. We suggest a minimum 4GB for better performance


Create a virtual drive now, minimum 20GB is recommended


Complete the Virtual Disk creation based on your preferences (eg: location, VDI or VMDK)

We just created a new VM, however remaining are few more settings. Let us analyze what kind of choices were made by VirtualBox for our new VM until.




Change the number of processors to 2, if you have more cores.


Finally load your ISO file to the IDE controller.


Save the changes by clicking “Ok” and let us start the VM finally, thus initiating the installation process


Based on the language selection you made prior downloading the ISO file, you will be prompted to start the installation after couple of minutes waiting


Follow the prompts and Select “Custom” installation while prompted.


Rest assured, wait for the installation to complete.


We opted to go with “Express settings” for the installation


You will be asked to sign in with a Microsoft Account next, just select “Create a new account”, that will allow you to “Sign in without a Microsoft Account” option


Once a local account created, you will go through the same Windows 8/8.1 setting up procedure, stay calm


That’s it folks, now you have completed the installation of Windows 10 Technical Preview using Oracle VirtualBox!

It’s time to click on the “Start Menu” button Winking smile


for Windows7bugs


Windows |Rotate your display

August 4, 2014


Once in a while, awkwardly you press a combination of keys and all of sudden your display is upside down or either by right or left side and you are baffled without an idea how to bring it back to the normal position? Here is the magic key combination

CTRL+ALT+UP Arrow Key (Normal position)


Try the following ones

  1. CTRL+ALT+Down Arrow key (Inverted/upside down)
  2. CTRL+ALT+Left Arrow Key (Taskbar by your right side vertical)
  3. CTRL+ALT+Right Arrow Key (Taskbar by your left side vertical)




Get every new post delivered to your Inbox.

Join 53 other followers