Recent blog entries

From the monthly archives: July 2014

We are pleased to present below all posts archived in 'July 2014'. If you still can't find what you are looking for, try using the search box.

WES: Using Diskpart from a Batch File

I recently needed to create and format a disk partition from a batch file.  To make this more fun, I needed to run the batch file from a USB disk which mounted as the D drive, but I needed the new partition to be the D drive when finished. in the interest of full disclosure, there are other ways to do this, but I wanted to do it from a batch file because I was doing other things from batch files at the time – so this method fit in. I started this by doing running diskpart and learning what could do and how to do it.  To start I knew that I needed to create disk 0 partition 2 and format it with NTFS.  The commands in diskpart are: select disk 0 create partition primary noerr select part 2 format fs=ntfs label=Data quick These command create and partition disk 0 partition 2 and format the disk.  But what I found is that the USB disk was the D drive and the new partition was the F driver, not what I want.   But if before creating the partition, I ch ...

Read the rest of entry »

WES: Batch Installing a Driver Using the INF File

I was installing a driver over and over, and thought that there must be a better way than going to the device manager.  Well, it turns out that there is.

The plug and play utility (pnputil.exe) is designed for this purpose.   The following installs from an INF named mydriver.inf.

pnputil.exe -i -a "c:\OEM\mydrive.inf"

Which I included in the following batch file, which copies the driver to a folder on the C drive, installs the driver, then reboots if the user agrees.

@echo off

xcopy /s /e /q /Y /I OEM c:\OEM

pnputil.exe -i -a "c:\OEM\mydrive.inf"

echo.
echo.
echo A reboot is necessary for these changes to take effect.
echo.
set /p input= "Reboot Now (Y/N)?"

echo %input%
IF "%input%"=="y" goto :REBOOT
IF "%input%"=="Y" goto :REBOOT
goto :EOF

:REBOOT
shutdown /r /t 0

 

Copyright © 2015 – Bruce Eitman and Embedded101.com
All Rights Reserved

Bruce Eitman's blog

Search blog

TagCloud

Archive

Recent Comments

  1. Re: Windows 10 IoT Core: Shutdown and Reboot the Raspberry Pi

    Bruce, I noticed that you are sending a REST web request for controlling the pi. I looked online a for...

    -- Waleed Elmandouh

  2. Re: Windows 10 IoT Core: Getting the MAC Address from Raspberry Pi

    Hi. This no longer works for me in the iot-core custom OEM-build/FFU. They have changed the access levels...

    -- GG

  3. Re: Windows 10 IoT Core: Getting the MAC Address from Raspberry Pi

    Hi, since I am having trouble with this intervace in an OEM-custom Image/FFU scenario, I wonder, how...

    -- GG

  4. Re: Windows 10 IoT Core: Shutdown and Reboot the Raspberry Pi

    I like your project here, and I've used it, and at one time it worked, at least with an older version...

    -- integral

  5. Re: Windows 10 IoT Core: Getting the MAC Address from Raspberry Pi

    Nifty, Bruce!

    -- David Jones

  6. Re: Windows 10 IoT Core: Getting the MAC Address from Raspberry Pi

    Hi Bruce, Good to know you are playing with Windows 10 IoT, and thanks for sharing these great finding...

    -- Samuel Phung

Turkish porno izle video site in rokettubeporno izle