Help - Search - Members - Calendar
Full Version: How MS made XP Dos bootdisk
The CD Forum > Bart's PE Builder > General
jaclaz
Very nice article on the internals of the DOS boot diskette you can make from XP.

Here:
http://mirror.href.com/thestarman/winxp/winxpsd.htm

I asked a friend that runs XP English (I am on Win2K) SP2 and the file version is 6.0.2600.0,
size 1.501.696 byte, like in the article.

Can people with different version of XP/2003 in English and other languages check whether the file is still the same?

jaclaz
Draugen
same results here, on english xp sp2. same filesize and version.

I even extracted the bytes in question (from offset 0x40F0 to offset 0x16C0EF) and tested in WinImage. Works perfectly - all files mentioned are present and accounted for.

kinda neat actually smile.gif (i don't know how USEFUL - there are better DOS boot disks out there, but a fancy "trick").
Nuno Brito
You'd be amazed with quantity of older files hanging around in newer systems - most times they are kept strictly for compatiblity - but it's always good to know the forensics of this boot disk.. smile.gif
philon
In XP Pro German:

filesize: 1502.208 Bytes
fileversion: 6.0.2600.0 (xpclient.010817-1148)
dated: 18.August 2001

philon
jaclaz
QUOTE (philon @ Apr 14 2006, 01:00 PM) *
In XP Pro German:

filesize: 1502.208 Bytes
fileversion: 6.0.2600.0 (xpclient.010817-1148)
dated: 18.August 2001

philon


Philon (and all other languages users)
could you please check with a hex editor whether the Disk image starts at the same offset.

I'll explain why I need this info.

I am putting together a batch file to generate a "good" DOS bootdisk from an installed XP.
By "good" I mean one that has a quick CD-ROM driver, i.e. QCDROM and some other useful nice Freeware utilities that can be freely distributed.
I tried all I could think of to make one with FREEDOS that could be recursively booted using GRUB4DOS/GRUB.EXE, but it seems like the loading of TSRs, like the CDROM extensions/driver breaks compatibility with GRUB.EXE, whilst DOS files from Windows 98 or those (originally ME ones) that come with XP seem to work ok.

The idea would be:
1) Use a program like dsfo, from the DS File Ops Kit:
http://members.ozemail.com.au/~nulifetv/fr...ware/index.html
to extract the floppy image from the diskcopy.dll

dsfo %SystemRoot%\System32\diskcopy.dll 440 1474560 XpDOS.img

2) Use a program like MCOPYF.EXE, part of the Mtools for Win32:
http://www.frontiernet.net/~fys/mtools.htm
to extract from the floppy image relevant files

mcopyf XpDOS.img %builddir%\COMMAND.COM
mcopyf XpDOS.img %builddir%\MSDOS.SYS
mcopyf XpDOS.img %builddir%\IO.SYS

3) Use a program like bfd or bfi from Bart's:
http://www.nu2.nu/bfd/index.php
http://www.nu2.nu/bfi/index.php
to re-build the floppy image including all the tools already assembled in the %toolsdir% directory

bfi -v -t=6 -o=IO.SYS -o=MSDOS.SYS -o=COMMAND.COM -l=GRUB4DOS -b=XPNT2003.bin -f=GRUB4FPY.IMG %toolsdir%

This way you can do it from batch, without need of a physical floppy drive, without mounting a Virtual Floppy Driver like Ken Kato's one and without need to install Winimage. UFS Explorer or other similar utilities.

Hope the above makes sense.

As always, ideas, suggestions and corrections are welcome.....

jaclaz
aec
QUOTE
Philon (and all other languages users)
could you please check with a hex editor whether the Disk image starts at the same offset.


In XP Greek

diskcopy.dll
Ver: 6.0.2600.0
FileSize: 1.502.720 bytes
Image starts at offset: 3828 hex

aec
philon
Addendum:

the german version starts at offset 3820

philon
jaclaz
Sorry mates, I know this is probably getting a nuisance, but could you try and verify the following:
1) Download gsar from here:
http://home.online.no/~tjaberg/
http://home.online.no/~tjaberg/gsar112.zip
(it is a 41 Kb file)
2) unzip gsar.exe wherever you want, make in the same dir a batch file with this content:
CODE
gsar -b -s:xEB:x3C:x90:x2A:x2D:x76:x34:x56:x49:x48:x43:x00 %SystemRoot%\System32\diskcopy.dll

(the above is on a single line)
3)open a dos prompt, navigate to the directory and execute the batch file
output should be something like
QUOTE
C:\Windows\System32\diskcopy.dll: 0x40f0
C:\Windows\System32\diskcopy.dll: 1 match found


As it seems that addresses are different in different languages I find it better to do a search for the floppy header and get "dynamically" the offset, this, provided that in all versions the "strange" floppy label of "*-v4VIHC" is fixed, should guarantee a better portability....

jaclaz
aec
Hi jaclaz

The output is correct for WinXP Greek

CODE
gsar -b -s:xEB:x3C:x90:x2A:x2D:x76:x34:x56:x49:x48:x43:x00 %SystemRoot%\System32\diskcopy.dll

C:\WINDOWS\System32\diskcopy.dll: 0x3828
C:\WINDOWS\System32\diskcopy.dll: 1 match found


aec
philon
@jaclaz (master of links)

was very close wink.gif :

CODE
C:\WINDOWS\System32\diskcopy.dll
C:\WINDOWS\System32\diskcopy.dll: 0x3828
C:\WINDOWS\System32\diskcopy.dll: 1 match found


philon
jaclaz
Thanks,
I think I can take for granted that the disk image "label" is the same in all languages. smile.gif

Any other taker (from other countries)?


jaclaz
ceroni
Windows XP SP2 PT-BR (Brazilian portuguese) diskcopy.dll:
6.0.2600.0 (1.502.208 bytes)
CODE
C:\WINDOWS\System32\diskcopy.dll: 0x3828
hamradio
QUOTE (jaclaz @ Apr 14 2006, 01:14 PM) *
Philon (and all other languages users)
could you please check with a hex editor whether the Disk image starts at the same offset.

I'll explain why I need this info.

I am putting together a batch file to generate a "good" DOS bootdisk from an installed XP.
By "good" I mean one that has a quick CD-ROM driver, i.e. QCDROM and some other useful nice Freeware utilities that can be freely distributed.
I tried all I could think of to make one with FREEDOS that could be recursively booted using GRUB4DOS/GRUB.EXE, but it seems like the loading of TSRs, like the CDROM extensions/driver breaks compatibility with GRUB.EXE, whilst DOS files from Windows 98 or those (originally ME ones) that come with XP seem to work ok.

The idea would be:
1) Use a program like dsfo, from the DS File Ops Kit:
http://members.ozemail.com.au/~nulifetv/fr...ware/index.html
to extract the floppy image from the diskcopy.dll

dsfo %SystemRoot%\System32\diskcopy.dll 440 1474560 XpDOS.img

2) Use a program like MCOPYF.EXE, part of the Mtools for Win32:
http://www.frontiernet.net/~fys/mtools.htm
to extract from the floppy image relevant files

mcopyf XpDOS.img %builddir%\COMMAND.COM
mcopyf XpDOS.img %builddir%\MSDOS.SYS
mcopyf XpDOS.img %builddir%\IO.SYS

3) Use a program like bfd or bfi from Bart's:
http://www.nu2.nu/bfd/index.php
http://www.nu2.nu/bfi/index.php
to re-build the floppy image including all the tools already assembled in the %toolsdir% directory

bfi -v -t=6 -o=IO.SYS -o=MSDOS.SYS -o=COMMAND.COM -l=GRUB4DOS -b=XPNT2003.bin -f=GRUB4FPY.IMG %toolsdir%

This way you can do it from batch, without need of a physical floppy drive, without mounting a Virtual Floppy Driver like Ken Kato's one and without need to install Winimage. UFS Explorer or other similar utilities.

Hope the above makes sense.

As always, ideas, suggestions and corrections are welcome.....

jaclaz


Another way to extract
Use Restorator (or similar prog) and extract BINFILE saving it in .raw format - the size is 1474560 and
you got floppy image.
Size of diskcopy.dll depends on language - different string length.
jaclaz
QUOTE (hamradio)
Another way to extract
Use Restorator (or similar prog) and extract BINFILE saving it in .raw format - the size is 1474560 and
you got floppy image.
Size of diskcopy.dll depends on language - different string length.


Yep, but you see, all the point is doing it from batch and on all languages.


On a side note, it seems like this "version" of ME already has HIMEM.SYS "embedded", at least both HIMEM.SYS 3.95 (Win9x) and FREEDOS HIMEM.EXE do not load, saying that XMS has been already installed.

This is coherent with MDGX's report here:
http://www.mdgx.com/newtip20.htm
but I am failing to see why ME bootdisks you can find all have HIMEM.SYS as a separate file, and even on the diskette image there is a "deleted" HIMEM.SYS.


jaclaz
bilou_gateux
2003 Server Web Edition w/ SP1 ENU %SystemRoot%\system32\diskcopy.dll 0x4720
XP Pro w/ SP1 FRA %SystemRoot%\system32\diskcopy.dll 0x3828
hamradio
QUOTE (jaclaz @ Apr 15 2006, 11:14 AM) *
Yep, but you see, all the point is doing it from batch and on all languages.
On a side note, it seems like this "version" of ME already has HIMEM.SYS "embedded", at least both HIMEM.SYS 3.95 (Win9x) and FREEDOS HIMEM.EXE do not load, saying that XMS has been already installed.

This is coherent with MDGX's report here:
http://www.mdgx.com/newtip20.htm
but I am failing to see why ME bootdisks you can find all have HIMEM.SYS as a separate file, and even on the diskette image there is a "deleted" HIMEM.SYS.
jaclaz


Yes, using batch process is better way.
Image contains a lot of deleted files - they just kept core (kernel) files.
Bernat
Windows XP SP2 French
diskopy.dll
6.00.2600.0000 (xpclient.010817-1148)
size 1 502 208 bytes

Searching hexa chain EB3C902A2D76345649484300
Found once at 0x3828
Ozzyguy66
Same results here.
WinXP SP2 Australia

C:\Windows\System32\diskcopy.dll: 0x40f0
C:\Windows\System32\diskcopy.dll: 1 match found


Ozzy
Nuno Brito
Results differ in Windows 2003 standard edition (english) huh.gif

C:\Windows\System32\diskcopy.dll: 0x4720
C:\Windows\System32\diskcopy.dll: 1 match found


I hope this helps your research.. smile.gif
jaclaz
Nuno,
since you "happened to pass nearby" (I did not want to bother you asking it out of topic), I can extract the files allright, using my "rude" batch way.

But, as you can see above, the user needs to have quite a bit of utilities handy.

Couldn't you put together one of yours batcher .scripts to do this ?

jaclaz
Nuno Brito
I'm quite interested in learning more about these "hidden" features within common microsoft files - seems a lot of code is copied or bundled across different versions/releases ever since win31..

This link might be interesting (if you didn't knew it already..)

I'll do a small .script to test an OS and report back some info in a text file - this task is really easy since I think you've done all the hard work involved - do you need any additional features?

laugh.gif
Nuno Brito
Here is the .script - to use just copy the code below and save to a text file (don't forget to add .script as extension)


This script will unpack gsar.exe and output the result into a text file. Your default text editor will open this file to ease copying back the results..


CODE
[main]
Title=Test Image
Description=This .script will your current windows version to check the details on the boot image within diskcopy.dll
selected=true
Level=3
Credits=JacLaz - the reason for this .script to exist..
Author=Nuno Brito
Contact=http://www.911cd.net/forums//index.php?showtopic=16745
Date=
Version=1.0

[EncodedFolders]
Folder

[EncodedFile-Folder-gsar.exe]
lines=2
0=eJztfA14G8d14AACZVqiRFgio/9oZYsiaYk0KVE2RZo2KHklUtUPRBKObVmRQGAhQAEBGNilyJzoQqaYCkboME3u2rtLrubJzdlNv6ucqK
li+2zqpyJVOw3jT71jbdWhEzpZFEzLs3kOalPGvTczuwCXpGTn69ev/Zq1hzs/72/evDfzZnagvY/1kXmEEAukdJqQ84Q9NnLrJwpp8dqXFpNzt/9o3XnTnh+ta/H6IkIoHDwadrYJLmcgEJSFVkkIKwHBFxAe2t8stAXdUvmiRQvWcxp2kZA9Jgv5o/1/Ua/RHSX55oUmczXZDoU9kBZAsvJ0hEuHeTOT28Tlp08fK+SaTLRfhAgMFv9YGYj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Zd77EvYPdWzkK5DSkCyLrWREKSzkCYgVRRAGdIwpIpCyEM6C8n6OchDGoZUsYzRCcF7GFLFchul3w
fvCUj2FYCzgsFMwLtiJcBCOruS18Hbvgo8ZZVtmny48uCZm/Z8Gh8ZtU+noeH81r/+7T8t0Uz+1ClCqk4SEsqqew7q7FB3OquupYcQ78m5aVqfImQ1pE2QqiE1PJVp80JehhSF9NWs+m9C/jlI5yANQboGaRTSOKRJhOsmJA9SASQBUgmkKkg2SA2QWiA9DskNyQ9JhhSF9FVIfwjpOUhnIb0CaQjSN
UijkMYhpSBZoJ9WSKshlaAeINkg7YH0CCT3qX8v/at3u+vlYBtsU58iYodPtoeDLon+41LfIDt9Ad74GtklyZjd52yTAPaUuVmSHQH+8x+xwyXRL57sn2AA3
NXkMH6HDgQhv5Ec9kWcstwJ+YfI4Ygk06+2ZD/kZadMisnhw0eh0ukLOMNHI6QWyqHDh6VAuy8cDBCyD8qAdNgZCh2WO0MSSt1ODrskkBbzL2Tx+h7kGXV
C3gG+wVawZ9PhYIADK6YM/09MztZgWCY5Zqes0VpqZrnPmT0ufzBC6awwezx+JeLF/DqzB28okjvNnlDYF5A9UHcX5BXZRdbTd4QUmz14M4mU4BsoVJg97PojPPebfRFXQA77Cf4bX74I/pYS9fUQ5JVQiOYPmtucfn/QhfBOc5vU5gqh6ogL8yA95p8wAwsOFDazCwdYHzGzC06Y7zADcHurgjJ2miO+owEnsiUnzBFd9qg5Iod
dTkrzJM17UQQYX8wzvqcxD/rF/O9jXg5SOt82Q4bL/98gr8l/xtyeUU50ZvodsWmfuGfL5nK3n9IpiE5PbZF2V1hmrSXRf/0pW95/7c//B96NYs94nONIL04s0kutSGUYBSMSBECos/LYpe3+V51gYAIA59wG48Ns9gQBAAAAAgAAACMAAADNHwAAAAAAAAEAAAAAAAAAAAAAAA

[Folder]
gsar.exe=8212,10954

[process]
echo,1,"Extracting files.."
ExtractAllFiles,1,"%ScriptFile%","Folder","%tempdir%"
echo,1,"Starting test.."
ShellExecute,1,hide,"cmd.exe","/c  %tempdir%gsar.exe -b -s:xEB:x3C:x90:x2A:x2D:x76:x34:x56:x49:x48:x43:x00 %SystemRoot%\System32\diskcopy.dll >> %tempdir%result.txt"
ShellExecute,1,open,"%tempdir%result.txt",""
echo,1,"Deleting temporary files.."
FileDelete,1,"%tempdir%gsar.exe"
FileDelete,1,"%tempdir%result.txt"




A custom ready to use Batcher with this test script file are available at:

hxxp://nunobrito.100free.com/Test/testImage.zip
(Copy & paste to the explorer bar to download)


Good luck testing! smile.gif
jaclaz
@nuno
Yep, it works allright, thanks wink.gif, but actually what I meant was doing the entire generation of the DOS floppy image, as described here:
http://www.911cd.net/forums//index.php?showtopic=16745&st=4
(I know that it can become quite a bit of work)

One could add to the bfi "build" directory autoexec.bat, config.sys and some FREEDOS utilities, like FDISK/FORMAT, and so on...and have a handy "boot floppy maker", as an example very suitable for El-Torito boot CD's.

The main thing, which is that the "label" of the floppy remains the same in All languages and releases seem to be confirmed.

The problem I have found in making a simple batch file, but maybe I simply did not find the "right" method or did not try hard enough is to get the result of gsar (hex addrees) and "feed" it to dsfo (decimal).

Or there is possibly a way to get just the three needed files without extracting the image then using the mtools on it?

If the floppy is always the same, maybe files can be extracted directly with dsfo.

Or maybe there are other programs that can do the same more simply, after all, since we are working on a copy of a file, there is no "direct hardware access", everything is done operating with files....? huh.gif

jaclaz
Nuno Brito
I'm a bit in doubt about the format of the .img files, but if they are in raw mode (bit per bit floppy image) I can easily set up a custom tool to search and extract a file segment from a specified byte signature pattern.

This would probably ease things, avoiding the use of multiple tools and required conversions between them (perhaps only mtools are absolutely required for handling img files..)


Today's Goal: make a XP/2003 boot disk..


Ok, I'll get my hands on the task right away, may take a bit longer but will keep you posted of my progress.. smile.gif
jaclaz
Yes, .ima/.img files are bit by bit copies of a floppy.

Happy you joined in! smile.gif

One thing I did not check, is whether the files are contiguous on the floppy images, in which case it is even possible to simply extract the files....

jaclaz
jaclaz
Ok, it appears like files are contiguous:
1) we don't actually need to extract MSDOS.SYS file, which is plain text file so that it is easier to recreate it
CODE
echo;W98EBD> MSDOS.SYS

(or one could possibly experiment tweaking it as detailed by MDGX guide):
http://www.mdgx.com/msdos.htm

2) IO.SYS beginning can be found searching for
QUOTE
4D5A000000000000A01C
it begins at 4200hex in my copy, length is 116.736

3) COMMAND.COM beginning can be found searching for:
QUOTE
4D5A7001B6

it begins at 73C00hex in my copy, length is 93.040 bytes

Maybe the above approach is "less elegant" than the original one, but should be as effective....

jaclaz
Nuno Brito
If I didn't knew better, I'd say you have telepatic skills.. laugh.gif

Finished the interface of for a small program this afternoon - but got stuck on the file extracting part - after googling a bit, found some solutions that might work as I expect. At this precise moment I was still trying to figure out the file position from where to extract each file inside diskcopy.dll for starting some tests.. cool.gif


Wikipedia confirmed that .img format in raw bit per bit - only .imz is zipped (gzip?, zip?)




After having a more stable version working I'll make it work from the command line to suit batch purposes.. smile.gif
jaclaz
QUOTE
Wikipedia confirmed that .img format in raw bit per bit - only .imz is zipped (gzip?, zip?)


.imz is the compressed format Winimage by Gilles Vollant uses, the format is ZIP, info-zip library if I recall correctly.

jaclaz
Nuno Brito
DiskExtract

This is a small program that will search for a byte sequence and extract a specified number of bytes into a new file.




Download link:
http://rapidshare.de/files/19815398/DiskExtract01.zip.html


How to use?

- Download, extract, run program
- Press the "play" button to extract the image file


Features:

- All used settings are stored inside an INI file in the same directory as the program.
- It is possible to use %WindowsDir% as a variable that points to your local windows directory.


Know bugs

- None I could find at the moment - I've added some routines to ensure all values were valid before processing


Comments

JacLaz, I hope this was similar to what you were expecting.. smile.gif

I'm not sure about the bytes to copy length, but I've used this test value and worked fine - I'm a bit confused on this, can you please indicate the real size of this image?

In the future I will add command line support and invisible mode for batch files..


Final note

I can really thank JacLaz for pointing me back into this direction - I've learned a whole lot regarding files and streams, I already knew how to do this type of stuff on Turbo Pascal 7 age in DOS - but things have changed quite a bit since delphi appeared on scene - felt good to catch up with these changes.. laugh.gif
jaclaz
VERY good work! smile.gif

A "normal" 1.44 floppy image, like the one we are talking about is exactly
1,474,560 bytes

More sizes, see here:
http://www.911cd.net/forums//index.php?showtopic=10853&st=18


Feature request:
1) Maybe you could also put a search box for "text" and, cannot say if it possible, you should avoid using commas to separate hex values, so that "copy and paste" can be easily possible.
2) Also if it was possible to display the address where the string is found before extracting the data, it would be nice....

jaclaz
Nuno Brito
QUOTE
A "normal" 1.44 floppy image, like the one we are talking about is exactly
1,474,560 bytes


Added this number as default value


QUOTE
Feature request:
1) Maybe you could also put a search box for "text" and, cannot say if it possible, you should avoid using commas to separate hex values, so that "copy and paste" can be easily possible.
I just didn't added without commas in order to improve readability - next version will work without them..


QUOTE
2) Also if it was possible to display the address where the string is found before extracting the data, it would be nice....


Added a dialog box that displays the HEX adress offset - I was using decimal numbers mostly to stay on track and better understand where bugs were appearing - after a match is found you can select to save it into a new file


Finaly uploaded this file to my web host the link is here:
http://nunobrito.100free.com/Tools/DiskExtract01.zip
(copy & paste link to explorer bar)

smile.gif
jaclaz
EXCELLENT! smile.gif

jaclaz
Nuno Brito
Made some modifications, now it isn't necessary to add commas to separate the hex values.. smile.gif

Added a wildcard option and recurse subdirectories search - this will allow (for example) to search all windows files from the base dir recursing to each subdir and file matching the wildcard like: c:\windows\*.dll or c:\windows\*.*



here's the updated link (and permanent link)

http://nunobrito.100free.com/Tools/DiskExtract.zip

(copy & paste to explorer bar to properly download, size: ~170Kb)


Hope you like the changes.. laugh.gif
Nuno Brito
Current download location for DiskExtract can be found here: http://nunobrito.eu/download.php?view.3


Still the same work method to extract a MSDOS boot disk - click extract and get a fresh DOS boot disk image straight from your windows machine. sorcerer.gif
jacevedo3
Hi!,
I understand you whant to build the BootDisk with batch files so you need a console application to extract the image from diskcopy.dll I wrote an application to get the image you can download from http://jacevedo.phstech.info/getbtdsk.zip
I hope it helps.
jacevedo3
Hi again!,
To extract the files IO.SYS, MSDOS.SYS and COMMAND.COM from the BootDisk image once this is extracted from diskcopy.dll I recomend to use Vincent Mallet's DCFR.EXE can be downloaded from ftp://ftp.sac.sk/pub/sac/utildisk/dcfr004.zip and to get the Boot Sector use Bart's MKBT.EXE
jaclaz
@jacevedo3

Thank you for your contributions, having another method, and a "cleaner" one is definitely a good thing! smile.gif

One question:
does XPBTDSK.EXE search for the "*-v4VIHC" label (or some other "typical" string) or does it use a "fixed" address (and is thus suitable only for some versions of the file)? unsure.gif

jaclaz
jacevedo3
You are welcome. XPBTDSK.EXE searches for the first 12 bytes (in HEX: EB 3C 90 2A 2D 76 34 56 49 48 43 00) of the BootDisk image so it will work with the different language versions.
jaclaz
QUOTE (jacevedo3 @ Jan 2 2008, 07:13 PM) *
You are welcome. XPBTDSK.EXE searches for the first 12 bytes (in HEX: EB 3C 90 2A 2D 76 34 56 49 48 43 00) of the BootDisk image so it will work with the different language versions.


Thanks. smile.gif

jaclaz
0ffer
Direct patch diskcopy.dll : diskcopypatch.bat - based on old Real DOS-Mode Patch for Windows Millennium v1.3 By Reines [MFD] , 2000
CODE
gsar -o -s:x80:x75:x09:x8D -r:x80:xEB:x09:x8D %windir%\system32\diskcopy.dll
gsar -o -s:x75:x10:xB8:x0E:x16 -r:xEB:x10:xB8:x0E:x16 %windir%\system32\diskcopy.dll

Other patchs (Win3xStart etc...) MS-DOS 8.0
jaclaz
QUOTE (Nuno Brito @ May 8 2006, 01:09 PM) *
here's the updated link (and permanent link)



The meaning of permanent is perceived slightly differently here. hmm.gif

Quite incredibly (probably the first time I have found something useful there unsure.gif) there is a mirror at brothersoft:
http://www.brothersoft.com/disk-extract-123903.html

Anyway I am attaching a copy, hoping it will be more "permanent". whistling.gif
The attached also has a pre-configured .ini. wink.gif

For the record, the tool WAS also here - and AS WELL lost ph34r.gif:
http://z3.invisionfree.com/Boot_Land/index.php?showtopic=47
http://batcher.catch-free.com/downloads/misc/DiskExtract.zip



jaclaz
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.