In order to finish the project I am currently working on, I needed to gain access to the path of my setup exe application while it is running.

So I started by putting together a separate VB6 app which would return the full path of an exe file given one of its form's hwnd (windows handle). Then I ran my setup application, and fired up my test application at the same time. To my surprise I discovered that the path returned from the Setup file while it was running pointed to the AppData\Local\Temp directory (rather than its actual location on my hard drive) meaning that it seems to be running in virtualised mode.

The weird thing is that as the setup file contains the word "setup" Windows automatically asks for admin credentials so that it runs elevated with the rights needed to conduct the install. As far as I am aware elevating with Admin Credentials should have prevented any virtualisation from occurring, so why is my setup running virtualised?