'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Unrez the Nolf2 demo file - by Deunid, 2002 - All Rights Reserved ' ' Feel free to reuse at will except for sites competing with NolfGirl.com ' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Dim WshShell,WshFiles Dim location,locationDemo,command,answer,drive,freespace On Error Resume Next Set WshShell = WScript.CreateObject("WScript.Shell") Set WshFiles = WScript.CreateObject("Scripting.FileSystemObject") if (WshFiles is nothing) then msgbox "Ooops. This PC lacks the shell scripting capabilities required." & vbCr & "Please correct the problem (I need it to be able to work)!", vbExclamation,"Unrez Nolf2 Demo" else locationDemo = WshShell.RegRead("HKLM\Software\Monolith Productions\No One Lives Forever 2 (Official Demo)\1.0\InstallDir") if locationDemo = "" then msgbox "Ooops. The NOLF2 Demo does not seem correctly installed on this PC." & vbCr & "Please correct the problem (I need it to be able to work)!", vbExclamation,"Unrez Nolf2 Demo" else command = "WinRezLT.exe" if not WshFiles.fileExists(command) then msgbox "Ooops. WinRez LT do not seem installed." & vbCr & "Please correct the problem (I need it to be able to work)!", vbExclamation,"Unrez Nolf2 Demo" else Set drive = WshFiles.GetDrive(WshFiles.GetDriveName(locationDemo)) freespace = drive.FreeSpace/(1024*1204) if (freespace < 254) then msgbox "Sorry, there is not enough available space on drive " & WshFiles.GetDriveName(locationDemo) & ", 254 MB are needed. Free enough space and retry.", vbExclamation,"Unrez Nolf2 Demo" else answer = msgbox("Welcome to NolfGirl's NOLF2 skinning tutorial!" & vbCr & vbCr & "The unrez operation is about to begin." & vbCr & vbCr & "It will use about 250MB of disk space on drive " & WshFiles.GetDriveName(locationDemo) & "." & vbCr & vbCr & "It will take some time (a few minutes) and then come to report.", vbOkCancel, "Unrez Nolf2 Demo") if answer <> vbOk then msgbox "Nothing was done.", vbExclamation,"Unrez Nolf2 Demo" else command = "WinRezLT.exe /X """ & locationDemo & "\GAME.rez"" """ & locationDemo & "\NOLF2DEMO""" WshShell.Run command, 1, TRUE if not WshFiles.folderExists(locationDemo & "\NOLF2DEMO") then msgbox "Ooops. Sorry, but something seems to have went wrong when unrezing. Please try to unrez manually.", vbExclamation,"Unrez Nolf2 Demo" else command = "WinRezLT.exe /X """ & locationDemo & "\GAME2.rez"" """ & locationDemo & "\NOLF2DEMO""" WshShell.Run command, 1, TRUE command = "WinRezLT.exe /X """ & locationDemo & "\SOUND.rez"" """ & locationDemo & "\NOLF2DEMO""" WshShell.Run command, 1, TRUE command = "WinRezLT.exe /X """ & "MARKERS.rez"" """ & locationDemo & "\NOLF2DEMO""" WshShell.Run command, 1, TRUE msgbox "Done - Folder NOLF2DEMO created.", vbOKOnly,"Unrez Nolf2 Demo" end if end if end if end if end if end if