martedì 15 gennaio 2019

VmWare player / workstation bridged nic does not get IP Address and Virtualbox error : VERR_INTNET_FLT_IF_NOT_FOUND

On a pc where I was able to run virtualbox and vmware player using a bridged NIC , from one point in time on I was not able anymore to make them work.

I tried many of the solutions found in internet but noone was helping me.

In the end what did the job was to uninstall the nic drivers and install the windows default version like this:

1- windows device manager
2- find the NIC you are trying to use with virtualbox
3- check the driver version, maybe you need this in a later step
4- be sure to have somewhere this or other drivers version for this nic in case windows does not have any driver for it and you want to revert to the actual situation
5- uninstall it (and flag the "delete the driver software for this device" also)
6- run "scan for hardware changes"

If you are lucky, windows will detect the nic and install the windows default drivers for it, and in my case this solved the issue, probably the updated drivers I was using (from the vendor) was not compatible with virtualbox.

If you are not lucky, the nic will be detected but drivers not installed, in this case you should try to install a driver different from the one find in the point 3, maybe something older or something newer.
If you don't have any different version, in the worst case, you'll reinstall the same drivers in point 3 but probably you'll not solve your issue, but at least you'll be able to use your network like before, not from the virtual machine, sorry.

venerdì 19 ottobre 2018

I want to know the PATH of an EXE

Never happened that you run an exe from command prompt and you are not sure from what path it's run? sometimes this make the difference. Maybe you have multiple version of an exe, in multiple path or something like that, it's not working like expected and you want to be sure the correct one is run.

If the executable is gui application this is not really an issue, you can obtain the info from the task manager adding for example the "cmd" column, but if the executable is a command line one, that start and end in milliseconds, than you are in trouble.

One clue come from the command "where.exe":

where executablename

will give you all the path where that executable can be find.
But this will not tell you from which path it is run when you digit:


from a random folder from command prompt

As I'm not aware of any other way to know the path where it is run from , I wrote a very small console application in C# that simply run the process and print the process filename:

si = new ProcessStartInfo(args);
using (Process pr = Process.Start(si))

this does exactly what I need.

For example running my app from a random folder against "dism.exe" I see this:

C:\it>exepath dism

venerdì 7 settembre 2018

Vsphere VCENTER Server virtual appliance installation Stuck at 80% (and/or RPM installation failed)

I tried to install an old ISO image of the Vcenter virtual appliance from the 2017 and I discovered it was not installable anymore.

The installation progress stuck at 80% and in the end it failed with RPM installation failed.

Reading around it seems a bug in the image itself, the setup process cannot change the root password and so cannot continue and it fails.

Solution (in my case) :

Simply download the latest VCSA .ISO from VmWare site
(I just installed this succesfully: VMware-VCSA-all-6.5.0-7119157.iso )

NOTE: also this version seems to stuck at 80%, it will take a long time to move from 80% but in the end it will be able to pass it and finish the installation


Vsphere 6.5 setup from USB Key - "Not a COM32R image" error

To install VSphere 6.5 Hypervisor from a bootable USB key let's proceed like this:

1. from VmWare download the ISO file
2. download RUFUS
3. start it
4. open the ISO file form poin 1
5. be sure to set RUFUS with:

- MBR for BIOS or UEFI computers
- FAT32
- cluster size 4096 (default)
- quick format (default)
- create bootable disk using iso (default)
- create extended label and icon (default)

6. insert the USB key in the server and start it , set it to boot from USB or press the boot menu key
7. if you get the error message "Not a COM32R image" then press TAB key, you will see a suggestion like "install hddboot", well...
8. digit the command suggested install hddboot and press Return

The installation begin

martedì 15 maggio 2018


I was working o a server with a lot of applications and script continuously run from task scheduler and interacting with the desktop with their windows and console windows.
The server admin want them to be visible for checking reason.

But this way it was very annoying to work on that server because continuously interrupted by application or script started that took the focus and stay ahead of my job.

The best (not perfect) way I found to mitigate this is to use powershell to run the applications or script minimized and without taking focus.

In addition, as powershell itself open his console I had to find a workaround for this

Here my solution:

- create personal powershell module with function Start-ProcessNoFocus
- create folder c:\psmodules for my personal powershell modules
- changed environment variable to add c:\psmodules
- put my powershell module in c:\psmodules
- created scheduled task that run simply "powershell"
- run the scheduled task , a powershell window appeared, in properties, layout, window position I set the Y position of the window to be 800, on my monitor this moved the windows near out of the botton margin of the screen
- closed powershell window
- changed task scheduler to run my application like this:

program:              powershell
add argument:      -windowstyle hidden Start-ProcessNoFocus c:\test\MyApplication.exe

The result is :
- a powershell window appears and disappears very quickly
- it starts the process "MyApplication.exe" minimized and without taking focus

it's not perfect but now I'm able to work on the server without being continuously interrupted by all those annoying scheduled tasks.

This it the Start-ProcessNoFocus function that I put in a Start-ProcessNoFocus module :

(credits: #

function Start-ProcessNoFocus($FilePath, $Arguments) {
Add-Type -TypeDefinition @"
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
    public IntPtr hProcess;
    public IntPtr hThread;
    public uint dwProcessId;
    public uint dwThreadId;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct STARTUPINFO {
    public uint cb;
    public string lpReserved;
    public string lpDesktop;
    public string lpTitle;
    public uint dwX;
    public uint dwY;
    public uint dwXSize;
    public uint dwYSize;
    public uint dwXCountChars;
    public uint dwYCountChars;
    public uint dwFillAttribute;
    public STARTF dwFlags;
    public ShowWindow wShowWindow;
    public short cbReserved2;
    public IntPtr lpReserved2;
    public IntPtr hStdInput;
    public IntPtr hStdOutput;
    public IntPtr hStdError;
    public int length;
    public IntPtr lpSecurityDescriptor;
    public bool bInheritHandle;
public enum CreationFlags : int {
    NONE = 0,
    DEBUG_PROCESS = 0x00000001,
    DEBUG_ONLY_THIS_PROCESS = 0x00000002,
    CREATE_SUSPENDED = 0x00000004,
    DETACHED_PROCESS = 0x00000008,
    CREATE_NEW_CONSOLE = 0x00000010,
    CREATE_NEW_PROCESS_GROUP = 0x00000200,
    CREATE_SEPARATE_WOW_VDM = 0x00000800,
    CREATE_SHARED_WOW_VDM = 0x00001000,
    CREATE_NO_WINDOW = 0x08000000,
public enum STARTF : uint {
    STARTF_USESHOWWINDOW = 0x00000001,
    STARTF_USESIZE = 0x00000002,
    STARTF_USEPOSITION = 0x00000004,
    STARTF_USECOUNTCHARS = 0x00000008,
    STARTF_RUNFULLSCREEN = 0x00000020,  // ignored for non-x86 platforms
    STARTF_USESTDHANDLES = 0x00000100,
public enum ShowWindow : short {
    SW_HIDE = 0,
    SW_NORMAL = 1,
    SW_MAXIMIZE = 3,
    SW_SHOW = 5,
    SW_MINIMIZE = 6,
    SW_SHOWNA = 8,
    SW_RESTORE = 9,
    SW_MAX = 11
public static class Kernel32 {
    [DllImport("kernel32.dll", SetLastError=true)]
    public static extern bool CreateProcess(
        string lpApplicationName, 
        string lpCommandLine, 
        ref SECURITY_ATTRIBUTES lpProcessAttributes, 
        ref SECURITY_ATTRIBUTES lpThreadAttributes,
        bool bInheritHandles, 
        CreationFlags dwCreationFlags, 
        IntPtr lpEnvironment,
        string lpCurrentDirectory, 
        ref STARTUPINFO lpStartupInfo, 
        out PROCESS_INFORMATION lpProcessInformation);
    $si = New-Object STARTUPINFO
    $pi = New-Object PROCESS_INFORMATION
    $si.cb = [System.Runtime.InteropServices.Marshal]::SizeOf($si)
#    $si.wShowWindow = [ShowWindow]::SW_SHOWNOACTIVATE

# mia versione 4+2 ovvero non prendere il focus e starta in minimized
    $si.wShowWindow = 6
    $pSec = New-Object SECURITY_ATTRIBUTES
    $tSec = New-Object SECURITY_ATTRIBUTES
    $pSec.Length = [System.Runtime.InteropServices.Marshal]::SizeOf($pSec)
    $tSec.Length = [System.Runtime.InteropServices.Marshal]::SizeOf($tSec)
    [Kernel32]::CreateProcess($FilePath, $Arguments, [ref] $pSec, [ref] $tSec, $false, [CreationFlags]::CREATE_NEW_CONSOLE, [IntPtr]::Zero, (pwd | select -exp Path), [ref] $si, [ref] $pi)

venerdì 23 marzo 2018

Unavailable disk letter in disk manager or mapping network disk

It happened today to me,
I had to map and UNC path to local drive E: but I was not able, like it was already taken and in use.
In detail, I didn't have the letter as available when from explorer (the windows gui) I was trying to map the unc path to a letter.
But then I tried to go to disk manager changing one drive's letter just to see, and the E: letter was not available...

So there was something using it but...
It was not used by some other network disk,
it was not used by a physical device in disk manager
it was not stored in the registry under Mapped Devices (some usb device disconnected maybe...)

in the end the only place where I found a reference to it was like this:

mountvol e: /L

something like this appeared (this is just an example from the command help) :


to check what it was I tried to lauch "execute" from windows (W key + R ), pasted that string (\\?\Volume{e49c2b64-99e4-11e6-a7c2-806e6f6e6963}\) and confirmed...

I got an error, so I think that device , whatever it was , was not anymore connected to my pc.
So I run this other command:

(I take no responsability if you are going to delete mapping to some device needed by your system to work correctly! )

mountvol e: /D

just to check the result of my operation I did this one again:

mountvol e: /L

I got an error, this means the device is not anymore mapped.

I then restarted the pc (maybe a logout was enough?) and voilà, the E: letter was again available! 😄


martedì 5 gennaio 2016

Deploy Windows 8 WIM image

Disclaimer: I'm not responsible for any damage that could  happen to your devices following this guide. It' under your own responsability!

Here a brief description of the steps needed to deploy a W8 WIM image to a BIOS computer:

1. put the WIM image on some sort of USB device (i.e. install.wim)
2. boot the computer with some sort of bootable media that contain DISM (i.e. AIK cd or the W8 installation dvd or AOEMI Backupper or anything else)
3. once booted, from the prompt enter:

select disk 0
clean                                                    <--- be careful! this will erase the content of the disk!!
create partition primary size=350
format quick fs=ntfs label=System
assign letter=S
create partition primary
format quick fs=ntfs label=Windows
assign letter=W

Let's say install.wim in in the H: drive in a "win8" folder:

dism /apply-image /imagefile:h\win8\install.wim /index:1 /applydir:w:\

now you have the windows file in the W: disk, we need to make it bootable

bcdboot w:\windows /l it-it /s s: /ALL

reboot the pc it should load now the Windows 8 OS just installed