Virtual Server scripts inside virtual machines

16. January 2007 05:38 by smurillo in General  //  Tags:   //   Comments (10)

If you are familiar with Virtual Server you know that you can use it to run scripts on the Host OS by attaching them to events, such as: turning on or off the Virtual Server service, or turning on or off a virtual machine.

But these scripts run on the host. What if you want to launch an application inside the guest OS?

Suppose you have a VBScript file called MyVBScript.vbs, and you want to run it inside the guest operating system of a virtual machine, or a bunch of them. You can create an ISO image that will contain an Autorun configuration that will execute this script. Once that's done, you can simply attach the ISO file to the virtual machine(s) where you want your script to run.

We will use the unauthorized ISO Recorder Power Toy to create the ISO file. ISO Recorder v2.0 works on Windows XP and Windows 2003. After you install this application you will be able to create ISO files out of folders in your filesystem.

  1. Create a new folder. Let's call it VMScript.
  2. Copy MyVBScript.vbs to the VMScript folder.
  3. Create a new file in the folder called Autorun.inf.
  4. Edit the Autorun.inf file and add the following lines:
  5. [autorun]
    open=wscript MyVBScript.vbs

  6. You can replace the text after "open=" if you want to execute a different command line, you can even launch an application with a UI.
  7. Save the Autorun.inf file.
  8. Right clik on the VMScript folder and select Create ISO image file.

    isorecorder
  9. Follow the wizard steps and a new file called RemoteScript.iso will be created. This is the CD/DVD image that you can attach to the virtual machine where you want the script to run. When you do, unless the Autorun feature has been disabled, your script will launch in the guest OS.

This is the same technique that Microsoft uses to launch the VM Additions and the precompactor. Now you can exploit this and even create interesting combinations. For instance you can attach a script to an event in Virtual Server that will attach your ISO file to a virtual machine.

IMPORTANT NOTES:

  • ISO Recorder is meant to be used for personal use, but it is used by a number of companies around the world. I have found no problems with it. Make sure you read the license agreement and documentation for this application.
  • AutoRun is normally enabled by default on Windows operating systems. For more information on this read CD AutoRun basics.
  • If you are not that familiar with Virtual Server and you don't know how to attach ISO files, manage removable media or attach scripts to Virtual Server, read the Virtual Server Administrator's Guide included in the installation package.

Comments (10) -

Anonymous
Anonymous
9/30/2009 12:28:57 AM #

That is a really very good article. I am glad to know. Thanks!


Anonymous
Anonymous
9/30/2009 12:28:57 AM #

That is a really very good article. I am glad to know. Thanks!


Anonymous
Anonymous
9/30/2009 12:28:57 AM #

That is a really very good article. I am glad to know. Thanks!


Anonymous
Anonymous
9/30/2009 12:28:57 AM #

That is a really very good article. I am glad to know. Thanks!


Anonymous
Anonymous
9/30/2009 12:28:57 AM #

That is a really very good article. I am glad to know. Thanks!


Anonymous
Anonymous
9/30/2009 12:28:57 AM #

That is a really very good article. I am glad to know. Thanks!


best vps
best vps
7/28/2012 1:25:49 AM #

Thanks introduce internal information about VPS.I am always ready to see such type of knowledgeable information.  
http://www.alphavbox.com

dusao
dusao
9/10/2012 7:19:32 PM #

http://www.coachoutletusae.com/ Coach outlet online store
http://www.coachsfactorysoutlet20l2.com/ Coach outlet online
http://www.coachoutletusae.com/ Coach outlet online
http://www.coachsfactorysoutlet20l2.com/ Coach outlet
http://www.coachpursesoutlets20l2.com/ Coach outlet online
http://www.coachoutletusae.com/ Coach outlet
http://www.coachsfactorysoutlet20l2.com/ Coach outlet store
http://www.coachpursesoutlets20l2.com/ Coach outlet store online

gasdfgasg
gasdfgasg
12/3/2012 2:05:28 AM #

The cumulative amount they're accused of stealing is not spelled out in court records, http://www.replicawatchesuk4sale.com http://www.replicawatchesuk4sale.com . The bill of information, which the Jefferson Parish district attorney's office filed in the 24th Judicial District Court in Gretna Friday, lists credit card and check expenditures totaling almost $325,000, http://www.google.co.uk google.co.uk .
http://www.replicawatchesuk4sale.com Replica  credit card bill payments totally about $275,000 are listed, but only to spell out how the alleged conspiracy unfolded when they had a clerk or secretary pay the monthly bills that included alleged illegal spending is mingled with  www.replicawatchesuk4sale.com/gucci-watches.html Replica Gucci Watches  expenses.

Patrick Willis Jersey
Patrick Willis Jersey
1/24/2013 7:46:19 PM #

http://www.49ersfanmall.com/alex-smith-jersey           Alex Smith Jersey
http://www.49ersfanmall.com/kyle-williams-jersey           Kyle Williams Jersey
http://www.49ersfanmall.com/patrick-willis-jersey           Patrick Willis Jersey
http://www.49ersfanmall.com/vernon-davis-jersey           Vernon Davis Jersey
http://www.49ersfanmall.com/frank-gore-jersey           Frank Gore Jersey
http://www.49ersfanmall.com/aldon-smith-jersey           Aldon Smith Jersey
www.49ersfanmall.com/michael-crabtree-jersey           Michael Crabtree Jersey
http://www.49ersfanmall.com/delanie-walker-jersey           Delanie Walker Jersey
http://www.49ersfanmall.com/justin-smith-jersey           Justin Smith Jersey
www.49ersfanmall.com/colin-kaepernick-jersey           Colin Kaepernick Jersey
http://www.49ersfanmall.com/aj-jenkins-jersey           A.J. Jenkins Jersey
http://www.49ersfanmall.com/ahmad-brooks-jersey           Ahmad Brooks Jersey
http://www.49ersfanmall.com/andy-lee-jersey           Andy Lee Jersey
http://www.49ersfanmall.com/anthony-davis-jersey           Anthony Davis Jersey
http://www.49ersfanmall.com/anthony-dixon-jersey           Anthony Dixon Jersey
http://www.49ersfanmall.com/brandon-jacobs-jersey           Brandon Jacobs Jersey
http://www.49ersfanmall.com/braylon-edwards-jersey           Braylon Edwards Jersey
http://www.49ersfanmall.com/carlos-rogers-jersey           Carlos Rogers Jersey
http://www.49ersfanmall.com/dashon-goldson-jersey           Dashon Goldson Jersey
http://www.49ersfanmall.com/david-akers-jersey           David Akers Jersey
http://www.49ersfanmall.com/donte-whitner-jersey           Donte Whitner Jersey
http://www.49ersfanmall.com/isaac-sopoaga-jersey           Isaac Sopoaga Jersey
http://www.49ersfanmall.com/joe-staley-jersey           Joe Staley Jersey
http://www.49ersfanmall.com/kendall-hunter-jersey           Kendall Hunter Jersey
http://www.49ersfanmall.com/lamichael-james-jersey           LaMichael James Jersey
www.49ersfanmall.com/mario-manningham-jersey           Mario Manningham Jersey
http://www.49ersfanmall.com/mike-iupati-jersey           Mike Iupati Jersey
http://www.49ersfanmall.com/navorro-bowman-jersey           Navorro Bowman Jersey
http://www.49ersfanmall.com/randy-moss-jersey           Randy Moss Jersey
http://www.49ersfanmall.com/ted-ginn-jersey           Ted Ginn Jersey
http://www.49ersfanmall.com/           49ers Jersey

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading