On Error Resume Next | |
Set oWshShell = CreateObject("WScript.Shell") | |
' turn back on pagefile | |
strCommand = "reg.exe add " & Chr(34) & _ | |
"HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" & Chr(34) &_ | |
" /v PagingFiles /d " & Chr(34) & "c:\pagefile.sys 0 0" & Chr(34) & " /t REG_MULTI_SZ /f" | |
Set oExec = oWshShell.Exec(strcommand) | |
Do While oExec.Status = 0 | |
WScript.Sleep 100 | |
Loop |