NetFltInstall.cpp revision 065adffee82ccc6f7d6f1dcc2815c03a098cff3e
/* $Id$ */
/** @file
* NetFltInstall - VBoxNetFlt installer command line tool
*/
/*
* Copyright (C) 2008 Sun Microsystems, Inc.
*
* Sun Microsystems, Inc. confidential
* All rights reserved
*/
#include <vbox/WinNetConfig.h>
#include <devguid.h>
#include <stdio.h>
#define NETFLT_ID L"sun_VBoxNetFlt"
#define VBOX_NETCFG_APP_NAME L"NetFltInstall"
#define VBOX_NETFLT_PT_INF L".\\VBoxNetFlt.inf"
#define VBOX_NETFLT_MP_INF L".\\VBoxNetFlt_m.inf"
#define VBOX_NETFLT_RETRIES 10
{
}
static int InstallNetFlt()
{
int r = 1;
{
int i = 0;
do
{
{
WinEr = GetLastError();
if(WinEr == ERROR_SUCCESS)
{
WinEr = GetLastError();
if(WinEr == ERROR_SUCCESS)
{
{
wprintf(L"installed successfully\n");
r = 0;
}
else
{
}
}
else
{
}
}
else
{
}
break;
}
{
{
}
else
{
wprintf(L"Error: write lock is owned by another application (%s), close the application and retry installing\n", lpszLockedBy);
r = 1;
break;
}
}
else
{
r = 1;
break;
}
} while(true);
}
else
{
r = 1;
}
return r;
}
{
return InstallNetFlt();
}