function run {
if search -n -s user -f $1; then
regexp -s name_ext '.*\.(.*)' "$1"
if regexp '^[eE][fF][iI]$' $name_ext; then
#chainloader "($user)$1"
vt_set_fake_vlnk "($user)$1" efi
efi_common_menuentry
vt_reset_fake_vlnk
elif regexp '^[cC][fF][gG]$' $name_ext; then
configfile "($user)$1"
elif regexp '^[wW][iI][mM]$' $name_ext; then
vt_set_fake_vlnk "($user)$1" wim
wim_common_menuentry
vt_reset_fake_vlnk
elif regexp '^[vV][hH][dD][xX]?$' $name_ext; then
vhdboot_common_func "($user)$1"
elif regexp '^[iI][sS][oO]$' $name_ext; then
vt_set_fake_vlnk "($user)$1" iso
if "$2"="-m"; then
miso_common_menuentry
else
iso_common_menuentry
fi
vt_reset_fake_vlnk
elif regexp '^[iI][mM][gG]$' $name_ext; then
vt_set_fake_vlnk "($user)$1" img
if "$2"="-m"; then
mimg_common_menuentry
else
img_common_menuentry
fi
vt_reset_fake_vlnk
fi
else
echo "$1 not found"
fi
}