show virtual machine name on desktop?
-
UncleBoarder
- Posts: 69
- Joined: 12. Aug 2010, 17:11
- Primary OS: Ubuntu 8.10
- VBox Version: OSE Debian
- Guest OSses: XP
show virtual machine name on desktop?
Is there a way to display the virtual machine name on the desktop? Like SysInternals BgInfo.
-
mpack
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Mostly XP
Re: show virtual machine name on desktop?
How would you change the desktop appearance normally? Do that.
-
Martin
- Volunteer
- Posts: 2562
- Joined: 30. May 2007, 18:05
- Primary OS: Fedora other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: XP, Win7, Win10, Linux, OS/2
Re: show virtual machine name on desktop?
You could use
'VBoxManage guestproperty set <vm name> vmname <vmname>'
to set a guestproperty variable and then read it out for BGINFO using
'VBoxControl guestproperty get vmname'
'VBoxManage guestproperty set <vm name> vmname <vmname>'
to set a guestproperty variable and then read it out for BGINFO using
'VBoxControl guestproperty get vmname'
-
UncleBoarder
- Posts: 69
- Joined: 12. Aug 2010, 17:11
- Primary OS: Ubuntu 8.10
- VBox Version: OSE Debian
- Guest OSses: XP
Re: show virtual machine name on desktop?
Great idea Martin!! It's perfect, I can add it to my clone script.
Do you happen to have a little more info on how to convert VBoxControl into something BGINFO understands?
Do you happen to have a little more info on how to convert VBoxControl into something BGINFO understands?
-
Sasquatch
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
Re: show virtual machine name on desktop?
The command returns the string that you put in earlier on the Host side. If BGinfo can't work with command outputs, then you need to somehow get it into a variable or something and deal it that way. The information is all here, all you need to do is get the BGinfo manual or instructions or whatever and get down and testing things.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
-
UncleBoarder
- Posts: 69
- Joined: 12. Aug 2010, 17:11
- Primary OS: Ubuntu 8.10
- VBox Version: OSE Debian
- Guest OSses: XP
Re: show virtual machine name on desktop?
Yeah I know, and that's what I've been doing. But the things BGinfo understands are things I've never used, like VBscript and WMI. I tried setting an environment variable but the VM has to be running which I don't want. So that's why I'm asking for assistance. I'm working on it on my end but when you have to learn a new language just to accomplish one task, it seems more reasonable to leverage your resources and ask for a little help from the experts.
From Google I did manage to write a VBscript that works from DOS but it doesn't work from BGinfo.
From Google I did manage to write a VBscript that works from DOS but it doesn't work from BGinfo.
Code: Select all
Option Explicit
Dim objShell
Set objShell = CreateObject("WScript.Shell")
objShell.Run "%comspec% /k vboxcontrol -nologo guestproperty get vmname"
Wscript.Quit-
Martin
- Volunteer
- Posts: 2562
- Joined: 30. May 2007, 18:05
- Primary OS: Fedora other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: XP, Win7, Win10, Linux, OS/2
Re: show virtual machine name on desktop?
It's too long since I last scripted Bginfo, but don't you need an 'echo' statement to send the information to the screen?