Dr said:
I have Windows 7 pro 64-bit, with a command prompt where VER reports
6.1.7601, and with Windows XP mode with a command prompt where VER
reports 5.1.2600.
Can I, with a batch file in Win 7, copy to/from the XP mode; and
can I, with a batch file in XP mode copy to/from the Win7?
And if so, how do I address the one from the other?
Otherwise, how about doing it with WSH JScript, WSH VBScript, or
Powershell? or otherwise?
I need to invoke certain systematic copying with a single command.
Treat this as a series of ideas, and not a recipe.
1) WinXP Mode relies on Windows Virtual PC software.
That's a "wall of emulation", intended to prevent direct
host to guest interaction. Interaction is only allowed
through certain specially defined ways. Windows Virtual PC
is a follow-on of VPC2007, and as far as I know, inherits
a 137GB limit on how large a file system can be made visible
in the guest environment.
2) The guest OS supports file sharing. You can mount a Windows 7
host share, within the guest OS. And then, run a script in the
guest if you want to copy.
3) Via "VPC Additions", when you have the WinXP Mode desktop visible,
you can "drag and drop" files from a host folder, into a guest
folder.
4) The virtual PC software may support a "shared folder". Which
is a way to get a folder of files to show up within the guest.
Again, once the stuff shows up as its own drive letter,
like X:, you can run a script in the guest, to copy files
to the internal WinXP Mode file system.
Note that the "bar" in the GUI, with VPC options, is poorly
implemented in Windows 7. You may want to look at VPC2007
control box dialogs, to get some idea as to the technical
capabilities of the software. Windows 7 hides things, and makes
it *very* hard to understand what options are available to you.
5) The final method, is to consider how the WinXP Mode OS is stored.
It could be stored on a .vhd or .vhdx file. This is a multi-GB
file, holding the entire C: of the WinXP Mode OS.
You shut down WinXP Mode first. That stops access to the .vhd or
.vhdx from WinXP. Then, you investigate Windows 7 method for
"mounting a .vhd". Once the VHD is mounted, it has its own
drive letter in Windows 7, and you can script or copy as you
see fit.
There are a ton of ways to do it.
*Always* be careful of the 137GB limit, which is a part of
Windows Virtual PC. I lost an NTFS partition when it got
corrupted by being shared between a host and guest. I was
writing an uncompressed video track, when I crossed the 137GB
boundary, and the file system as seen on the host side, was
irretrievably lost (address rollover and overwrite). As long
as the things you work on, are smaller than 137GB, it's
probably safe. If you're dealing with things larger than
that (like doing file sharing of a single 500GB partition),
then, ask more questions before proceeding. In fact, make
sure you have backups, before doing a thing like that.
Enjoy the research,
Paul