Ricky in Melbourne - Enjoy Learning

Use NTLite to add OEM drivers into Windows installation USB disk

While Windows 10 Technical Preview running perfectly on my 17 inch non-touch screen laptop which is not in a virtual machine but a physical PC, I would like to help Microsoft to make Windows better and send my feedback from a daily use computer.

So my next target is my 8 inch x86 Windows 8 tablet: Dell Venue 8 Pro.

Microsoft allow us either upgrade from Windows 8 to Windows 10, or have a fresh installation. but I don’t want to upgrade my Dell Venue 8 Pro since I have so many troubles in the past by upgrading.

I can see some people already tried on their DV8P, but most of them were upgrading. A friend of mine tried fresh install but it seems the installation file is lacking of some proper drivers, include the touch screen driver in the setup stage and the wireless driver in the first time new system start stage.

I don’t have a USB hub to connect my keyboard and mouse instead of using touch screen so I have no choice to fix it by inject the proper drivers into the setup USB disk.

So how can we integrated the drivers into the USB installation disk?

Well, there are several ways: we can use Windows ADK or MDT tool to inject the drivers which is much more complicated for a user; or in a large enterprise environment that have to deploy thousands of tablets at the same time usually can leverage the advantage by SCCM with MDT for Operating System Deployment

So is there any simple and easy way just for an basic user to add the drivers into the USB installation disk?

The answer is YES and the tool we will use today is called NTLite

OK, Let’s get started

1. Make a Windows 10 installation USB bootable disk

All we need to do is just downloading the tool called “Windows 7 USB/DVD Download Tool”, don’t be confused, this tool worked on any Windows version after Windows 7, include the Windows 10 Technical Preview

image

Choose your Windows installation .ISO file

image

Format your USB disk

imageimage

imageimage

At this stage, everything looks pretty straightforward

2. Prepare Dell OEM drivers

For my Dell Venue 8 Pro, I can get the latest OEM drivers from here

Just down the one called “5830-win8.1-A03-6VMWJ.CAB”

image

Unfortunately NTLite can only regonize .inf driver files, so we have to extract our .cab driver file by using below command

mkdir d:\downloads\DV8PDrivers

expand d:\downloads\5830-win8.1-A03-6VMWJ.CAB d:\downloads\DV8PDrivers -f:*

image

3. Inject Dell OEM drivers into both boot.wim and install.wim

Let me explain a little bit here: Windows is using boot.wim to boot into a WINPE environment (like Ghost we used in WinXP age), and deploy install.wim to the hard disk and sys-prep it

So in order to use the touch screen, we have to integrate the Dell driver into boot.wim; in order to use the wireless card when the first time new system start, we have to inject the driver into install.wim

Let’s just inject all the Dell drivers into both boot.wim and install.wim here

image

Click on Load button

You will see NTLite is mounting the image now

image

When the image loaded, this time is the install.wim actually, but what you will see is the OS name here “Windows Technical Preview”

Both two are the same, don’t worry about that

image

Click on Drivers

image

Click on Add, select “Folders and subfolders found drivers”

imageimage

Now you can see all the OEM drivers have been loaded here

image

Click on Apply

image

Press the start button

image

Apply the change

image

Repeat the same steps to inject the drivers into boot.wim

image

4. Change boot order to USB disk first

5. Boot from USB

6. Install Windows 10 Technical Preview

I’ve tested on my Dell Venue 8 Pro, both touch screen and wireless card can be recognized, and my Windows 10 installation process is so smooth

Enjoying Windows 10 Technical Preview, Don’t forget to send your feed back to Microsoft

By Ricky Gao (高俊) on October 7, 2014 | Tech, Windows Client | 1 comment

Enable Ctrl+V for command prompt in Windows 10

I think every Windows user knows what does Ctrl+C and Ctrl+V mean. But unfortunately it didn’t work in command prompt (cmd.exe)

I’ve been heard people complaining a lot about is the cmd in Windows operating system never support Ctrl+V, which is impacting not only IT pros but also almost everyone.

I really don’t know why Microsoft never made this available but luckily they started listening from Windows 10.

Personally I’m a big fan of trying out all beta products, has tester potential, right? haha, so as Microsoft released Windows 10 Technical Preview on 1st Oct, I’ve installed on my physical laptop in the first minute.

One of the most excited feature for me is FINALLY we got Ctrl+V supported in cmd in Windows 10.

So let’s have a look on the new Windows 10

Click on Start, you will see the new start menu on a keyboard driven PC.

As you can see the new start menu looks really awesome.

image

Type in CMD

image

It’s now like Windows 7, haha

Try Ctrl+V in cmd.exe in Windows 10

image

Still the same like previous Windows?

Yes, because we have to enable the new FEATURE first.

Right click on the cmd.exe title bar, select “Properties”

image

Now as you can see, there’s a new menu in the cmd.exe properties

image

Experimental

  • Enable experimental console features (applies globally)
  • Experimental Console Settings
  • Enable line wrapping selection
  • Filter clipboard contents on paste
  • Wrap text output on resize
  • Enable new Ctrl key shortcuts
  • Extended edit keys
  • Trim leading zeros on selection

 

Just tick “Enable new Ctrl key shortcuts” and try Ctrl+V again.

Good job Microsoft on listening to the users, especially the “Windows Feedback” app, let’s make Windows even better together

image

By Ricky Gao (高俊) on October 3, 2014 | Tech, Windows Client | A comment?

Australia long expire prepaid plan comparison

It is likely to see that not everybody likes to sign a phone contract with the Carrier with the Post-paid plan since it’s expensive. Some people still prefer to buy out the phone and stay with pre-paid plans.

So I did some homework by comparing the majority of the Australia pre-paid plans, especially for the people who has less phone calls and wants long expire day, just sharing it out to help people make an easy decision.

I’ve included the international call rate here as well, only to China but most countries are same, just because I need that information for my own Smile

 

Carrier Network
Coverage
Plan Call Australia
Local Mobile
Call Australia
Local Landline
Flagfall
Local
Call China Flagfall
International
SMS Australia
Local
SMS China Data (/MB) Expire Days Promotion
Amaysim Optus 3G Pay As You Go 0.12 0.12 0.00 0.06 0.00 0.12 0.25 0.05 90 Get $10 credit
Use link:
http://amaysi.ms/r/Z4yOj9zP
Aldi Telstra 3G Pay As You Go 0.12 0.12 0.00 0.10 0.00 0.12 0.25 0.05 365
Lyca Telstra 2G 0.15 0.03 0.29 0.00 0.29 0.15 0.15 0.07 90
Optus Optus 4G Connect 4 Less (expired) 0.10 0.10  0.23 0.01 0.23 0.10 0.20 0.05 90
no recharge needed
just make a voice call,
or send a message or data
Telstra Telstra 4G Simplicity 0.15 0.15 0.00 0.15 0.00 0.12 0.20 0.10 $20=30days
30$=60days
50$=90days
100$=180days
Telstra Telstra 4G Pre-Paid Long Life 0.78 0.78 0.39 0.89 0.39 0.29 0.35 2.00 20$=60days
30$=6months
70$=12months
Virgin Optus 4G Long Expiry 0.78 0.78 0.40 1.20 0.40 0.00 0.35 0.12 15$=180
49$=365
Vodafone Vodafone Vodafone International
Starter Pack
0.10 0.10 0.10 0.01
(1$ Max)
0.23 0.15 0.20 0.05 30

 

 


最近需要给家里人办一张澳洲预付费的手机卡(pre-paid),这两天对比了一下澳洲各大运营商的预付费手机卡。由于电话并不是很多,主要还是打国际长途回中国,所以还是想找一个有效期长的,打国内电话便宜的卡
分享一下我通过对比各大主要澳洲运营商的预付费卡的成果,希望能够帮助到有同样需求的童鞋

运营商 所用网络 套餐 澳洲手机 澳洲座机   接通费
(澳洲)
中国   接通费
(国际)
    短信
(澳洲)
  短信
(国际)
    流量
(每兆)
有效期
(天)
促销活动
Amaysim Optus 3G Pay As You Go 0.12 0.12 0.00 0.06 0.00 0.12 0.25 0.05 90 推荐朋友加入各送双方10$话费
链接:
http://amaysi.ms/r/Z4yOj9zP
Aldi Telstra 3G Pay As You Go 0.12 0.12 0.00 0.10 0.00 0.12 0.25 0.05 365
Lyca Telstra 2G 0.15 0.03 0.29 0.00 0.29 0.15 0.15 0.07 90
Optus Optus 4G Connect 4 Less (expired) 0.10 0.10  0.23 0.01 0.23 0.10 0.20 0.05 90
不需要充值,只要打个电话,发个短信或者用流量即可续90天
Telstra Telstra 4G Simplicity 0.15 0.15 0.00 0.15 0.00 0.12 0.20 0.10 充20续30天
充30续60天
充50续90天
充100续180天
Telstra Telstra 4G Pre-Paid Long Life 0.78 0.78 0.39 0.89 0.39 0.29 0.35 2.00 充20续60天
充30续6个月
充70续12个月
Virgin Optus 4G Long Expiry 0.78 0.78 0.40 1.20 0.40 0.00 0.35 0.12 15$=180
49$=365
Vodafone Vodafone Vodafone International
Starter Pack
0.10 0.10 0.10 0.01
(1$封顶)
0.23 0.15 0.20 0.05 30
By Ricky Gao (高俊) on September 24, 2014 | Mobile | 2 comments

PowerShell to Find, Stop, Disable and Remove Windows Service from remote computers

Last time, I updated an internet PowerShell script to allow us Stop and Disable a specific Windows Service on remote computers.

This time, I’m in a more further scenario where I have to match the below criteria

Find specific Windows Service

Not Exist: Stop and show result

If exist:

            Stop Service

            Disable Service

            Delete Service

            Show result

The little challenge here is PowerShell doesn’t support removing Windows Service, so the easiest way is just using the building windows SC command

So let’s use another readable way approach to the script this time.

It’s not a fancy script, just post here to help people out.

——————————————————————————————————————————————————————————————————————–

$ServerListPath = read-host ‘?Please provide the full path of the serverlist file, like c:\server.txt’¡¥ #Prompt to input the server list

$Servers = get-content -Path $ServerListPath

$Service = read-host ‘?Please provide the service name to be removed’¡¥ #Prompt to input the service name, NOT the description name

function Confirm-WindowsServiceExists($Service) #Detect Service Existence

{

if (Get-Service -Name $Service -Computername $server -ErrorAction SilentlyContinue)

{

Write-Host "Service $Service Exists on $server" -ForegroundColor Green

return $true

}

Write-Host "Service $Service does not exist on $server" -ForegroundColor Red

return $false

}

function Remove-WindowsServiceIfItExists($Service) #Remove Service if exist

{

$exists = Confirm-WindowsServiceExists $Service

if ($exists)

{

Write-host "stopping Service $Service from $server" -ForegroundColor Green

sc.exe \\$server stop $Service #Stop Service

Start-Sleep -s 10 #Pause 10 seconds to wait for service stopped

Write-host "Disabling Service $Service from $server" -ForegroundColor Green

sc.exe \\$server config $Service start= disabled #Disable Service

Write-host "Kill MMC Service from $server" -ForegroundColor Green

taskkill /s $server /IM mmc /f #Kill mmc if exist which will prevent to delete service

Write-host "Removing Service $Service from $server" -ForegroundColor Green

sc.exe \\$server delete $Service #Delete Service

Write-host "Querying Service $Service from $server" -ForegroundColor Green

sc.exe \\$server qc $Service #Query Service again

}

}

ForEach ($server in $servers) {Remove-WindowsServiceIfItExists($Service)} #Loop

—————————————————————————————————————————————————————————————-

 

By Ricky Gao (高俊) on September 12, 2014 | Scripts, Tech | A comment?

PowerShell change WinXP product key and get reports

This time I was in a scenario where I need to bulk updating the Windows XP machine’s product key and get the reports back.

I know you may wondering from the tile with below questions

Does WinXP support PowerShell?

How do you update the WinXP product key with PowerShell?

Well, the answer here is NO, so actually I’m use PowerShell here for the report purpose, I still need to use PowerShell to call some VB script to change the keys Smile

Preparations:

1. GetKey.vbs

This VB script is used to get the current system or remote system’s Product Key, support both Windows XP and Windows 7 (Only for Volume License Key I believe, need testing on Windows 8 VLK)

The original script was from here which only support getting the remote computer’s key

I’ve updated the script and made this available to be able query local machine’s product key as well



‘ Find Product Activation Key on Remote Machine

‘ Got this from a posting by ‘Alatar1′ at www.theeldergeek.com

‘ I just added the inputbox – Rob

‘ Updated by www.RickyGao.com to support running locally

‘ Usage: save to GetKey.vbs, run without parameter will get the key from local machine, run with computer name will get the key from remote computer.

‘ Example Local Key: cscript.exe getkey.vbs

‘ Example Remote Key: cscript.exe getkey.vbs computername

If Wscript.Arguments.Count = 0 Then

strComputer = "."

Else

strCOmputer = Wscript.Arguments.Item(0)

End If

Dim Digits (24)

Digits (0) = "B" : Digits (1) = "C": Digits (2) = "D": Digits (3) = "F":

Digits (4) = "G": Digits (5) = "H": Digits (6) = "J": Digits (7) = "K":

Digits (8) = "M": Digits (9) = "P": Digits (10) = "Q": Digits (11) = "R":

Digits (12) = "T": Digits (13) = "V": Digits (14) = "W": Digits (15) = "X":

Digits (16) = "Y": Digits (17) = "2": Digits (18) = "3": Digits (19) = "4":

Digits (20) = "6" : Digits (21) = "7" : Digits (22) = "8": Digits (23) = "9"

Dim HexBuf (100), HexDigitalPID (15)

Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")

objReg.GetBinaryValue &H80000002, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\", "DigitalProductId", HexBuf

‘ Extract Relevant Section of Digital Product ID

StartOffset = 52 : EndOffset =67

For i = StartOffset to EndOffset

HexDigitalPID (i-StartOffset) = HexBuf(i)

next

‘ Convert Encoded Product ID to Activation Key

dLen = 29 : sLen = 15

KEYSTRING =""

for i=dLen-1 to 0 step -1

if ((i + 1) mod 6) = 0 then

KEYSTRING = KEYSTRING & "-"

else

HN = 0

For N = (sLen -1) to 0 step -1

Value = ( (HN *2^8 ) Or HexDigitalPID (N))

HexDigitalPID (N) = Value \ 24

HN = (Value mod 24)

next

KEYSTRING = KEYSTRING & Digits(HN)

end if

next

KEYSTRING2 = StrReverse (KEYSTRING)

WScript.Echo KEYSTRING2



2. ChangeVLKeySP1.vbs (ChangeVLKey2600.vbs for WinXP/Win2003 below SP1)

See more details from Microsoft KB328874

3. PSExec

Get the powerful PSExec.exe from Microsoft here

4. ChangeKey.ps1

Replace XXXXX-XXXXX-XXXXX-XXXXX-XXXXX to your new key and save below script code to ChangeKey.ps1



$OutPut = @() #Makes an array to hold all the object of the same fields

$ServerListPath = read-host ‘Please provide the full path of the serverlist file, like c:\server.txt’ #Prompt to input the server list

$ServerList = get-content -Path $serverlistpath #Get the server list

foreach ($ServerName in $ServerList)

{

    if (test-connection -computername $ServerName -quiet -count 2) #Check remote connection

    {

    $OldKey = cscript.exe .\getkey.vbs $ServerName //nologo #Get current product key

    copy .\ChangeVLKeySP1.vbs \\$ServerName\c$\ #Copy change key script to local c drive

    .\PsExec.exe -accepteula \\$ServerName cscript.exe C:\ChangeVLKeySP1.vbs XXXXX-XXXXX-XXXXX-XXXXX-XXXXX #Change product key

    del \\$ServerName\c$\ChangeVLKeySP1.vbs #delete the change key script

    $NewKey = cscript.exe .\getkey.vbs $ServerName //nologo #Get new product key

    }

else

{

$OldKey = "NoConnection"

$NewKey = "NoConnection"

}

$FinalResult = New-Object PSObject

Add-Member -inputObject $FinalResult -memberType NoteProperty -name “ServerName” -value $ServerName

Add-Member -inputObject $FinalResult -memberType NoteProperty -name “OldKey” -value $OldKey

Add-Member -inputObject $FinalResult -memberType NoteProperty -name “NewKey” -value $NewKey

$OutPut += $FinalResult

$FinalResult | ft -autosize

}

$OutPut | Export-Csv -noTypeInformation -path C:\Result.csv #report



5. Copy all of the above 4 files: GetKey.vbs, ChangeVLKeySP1.vbs/ChangeVLKey2600.vbs, PSExec.exe, ChangeKey.ps1 to any local folder

Too many scripts? YES, it is Windows XP which doesn’t support PowerShell, I can still recall back to the old days how hard we remote managing computers.

Anyway, it is just the way it is.

Now it’s time to rolling them out:

6. Open PowerShell console

7. Navigate to the local folder

8. Run .\ ChangeKey.ps1

9. Output will looks like below

clip_image002

10. Report is in result.csv

clip_image003

By Ricky Gao (高俊) on August 4, 2014 | Scripts, Tech | A comment?

AD
ADFS
ADRMS
Android
Azure
Certification
Citrix
Cluster