Run a process in VirtualBox from outside

You can launch a program within an Oracle VirtualBox virtual machine from the host system’s command prompt.

Example 1:  Run notepad in MS Windows 7 virtual machine named “7” as user “user” with password “1” from Ubuntu:

  • VBoxManage guestcontrol "7" run --exe "C:\\Windows\\notepad.exe" --username user --password 1

Example 2: Output guest network info:

  • VBoxManage --nologo guestcontrol "7" run --exe "c:\\windows\\system32\\ipconfig.exe" --username user --password 1 --wait-stdout

Notes:

  • You must have Guest Additions installed
  • The user account must have a password
Advertisements

Input line is too long

So you create a .bat file with a long list of arguments and it fails with a message:

“the input line is too long”

To avoid this, split your long single line into multitude of shorter lines separated by the caret character to mark the line break. Like this:

echo 1^
 2^
 3

 


Windows 10 icon PNG

A 48×48 pixel PNG icon for use with Linux desktops.

Can be used to start a virtual machine with MS Windows 10 inside.

Windows 10 icon, PNG, 48x48 pixels

Windows 10 icon, PNG, 48×48 pixels


Get Windows XP network information on command line

To display or set Windows XP network parameters (IP address, default gateway, DNS servers used, routing etc.) from the command line use netsh utility.

To see the list of options type:

  • netsh /?

Access denied in SAMBA with symlinks

Problem:

SAMBA clients attempt to access symbolic links pointing to directories outside of the particular share, but get “Access is denied” error.

Cause:

By default SAMBA now does not allow such symbolic links for safety reasons.

Solution:

Add these two lines to your smb.conf

wide links = yes
unix extensions = no

The first one enables full symlink support, the other one disables an option conflicting with it.


Skip creating Microsoft account in Windows 8.1

You may feel that Microsoft is forcing you into signing up for a Microsoft account and sharing your data in order to be able to activate Windows 8.1.

Everything in the setup screens seems to be made to lure the user into signing up with Microsoft.

But actually there is an alternative for the old good local user account, only that this option is hidden well enough in the small print several screens down, too far away for the average user to even notice it’s there.

  • When you see “Next you’ll set up your account” and then “Sign in to your Microsoft account”, select “Create a new account”.
  • Then, at the screen “Create a Microsoft account” select “Sign in without a Microsoft account”.
  • Configure a normal local user account in the old fashioned way.

Some bells and whistles of the Windows may lack functionality, but its up to you to decide if you need them.

Anyway, you can create a Microsoft account later, if you decide that you need one.


Lenovo B50-70 factory reset from recovery partition

To run a factory reset of Lenovo B50-70 from the hidden recovery partition:

  • Switch off the laptop.
  • Look for a small pinhole at the right side of the laptop, between the single USB port and the CD-DVD drive, closer to the USB port.
    At the first glance you may miss it, thinking that it is a kind of a LED indicator or even a miniature socket for earphones, as the OneKey Recovery symbol is very small and reminds of the headphone symbol.
  • Take a pointy object, preferably non-conductive one, e.g. a toothpick, insert it into the pinhole and gently push it. You will feel the miniature switch click. Keep pressed for about 2 seconds, then release and wait.
    The laptop then will switch on and boot into the special “Novo Button Menu” (its those  marketing people again…).
  • Select the “System Recovery” option and proceed in accordance to the instruction on the screen.

P.S.

I just wonder why those geniuses at Lenovo could not think of providing a simple and clear information on where to find the reset button. You can spend half a day reading manuals and calling up tech support, before you find it out.

It said nothing about the pinhole in any of the Lenovo manuals I read and the only information about it at the laptop itself was a marketing sticker boasting this function, without telling how exactly to activate it, only warning that “Some features are only available while running Microsoft Windows”, which does not help you much when your Windows has become unusable.

Go figure…