How to refresh or reset Windows 8 without an Installation Disk (VBScript)

Introduction

This PowerShell script sample shows how to refresh or reset Windows 8 without an Installation Disk in Windows 8.

Scenarios

Sometimes users want to refresh or reset Windows 8. But in Windows 8, it requires Media Disk. This script is to solve that.

Script

Step 1: Double click the script and it will show a UAC.
 

Step 2: Press Yes to continue, then there is dialog. Select the install.wim.
 

Step 3: After that, you can get some information about install.win.

Step 4: Then select the index of your operating system.

Note

1. System driver must be C.

2. Install.wim is in Windows IOS file, and the path is \\source\install.wim

Here are some code snippets for your references.

VB Script
Edit|Remove
Function SelectFile() 
    Dim objExec, strMSHTA, wshShell 
    SelectFile = "" 
    strMSHTA = "mshta.exe ""about:" & "<" & "input type=file id=FILE>" _ 
             & "<" & "script>FILE.click();new ActiveXObject('Scripting.FileSystemObject')" _ 
             & ".GetStandardStream(1).WriteLine(FILE.value);close();resizeTo(0,0);" & "<" & "/script>""" 
    Set wshShell = CreateObject( "WScript.Shell" ) 
    Set objExec = wshShell.Exec( strMSHTA ) 
    SelectFile = objExec.StdOut.ReadLine( ) 
    Set objExec = Nothing 
    Set wshShell = Nothing 
End Function 
End If 

Prerequisite

Windows 8 or later version