stukan wrote:
How about asking sawo to add the function to his Windows Server 2008 Workstation Converter.
It's a nice suggestion, but I'd like to keep this forum clean of illegal activities. However, to automate the process a bit you can try to use the following batch-script I created.
Code:
@echo off
color 1f
echo [*] Windows Server 2008 temporary Vista Pretender.
echo [*] Visit www.win2008workstation.com for more info!
set tokenspath=%windir%\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareLicensing
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName|find /I "Server"|find "2008">nul
IF %ERRORLEVEL% EQU 0 (
IF "%1" == "apply" (
IF EXIST tokens.dat (
IF EXIST %tokenspath%\tokens_original.cab (
echo [-] tokens.dat has already been replaced by the Vista version! Aborting...
goto end
)ELSE (
echo [+] Enter a Windows Vista serial in order to continue.
echo Format: XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
set /P vistaserial=
echo [+] Stopping Software Licensing services
net stop SLUINotify>con 2>nul
net stop slsvc>con 2>nul
echo [+] Deleting possible tokens_original.cab backup
del /Q %tokenspath%\tokens_original.cab>nul 2>&1
echo [+] Backing-up original tokens.dat to tokens_original.cab
makecab %tokenspath%\tokens.dat %tokenspath%\tokens_original.cab
echo [+] Copying Vista's tokens.dat overwriting the Server 2008 one
copy /Y tokens.dat %tokenspath%\tokens.dat
echo [+] Starting Software Licensing services again
net start slsvc>con 2>nul
net start SLUINotify>con 2>nul
echo [+] Applying Vista serial "%vistaserial%"...
cscript %windir%\system32\slmgr.vbs -ipk "%vistaserial%"
IF %ERRORLEVEL% NEQ 0 (
echo [-] Something went wrong, try to do it manually!
goto end
)ELSE (
echo [+] Serial installed! Reboot to apply new license!
goto end
)
)
)ELSE (
echo [-] Run this tool on Vista first to get it's tokens.dat!
goto end
)
)ELSE (
IF "%1" == "revert" (
IF EXIST %tokenspath%\tokens_original.cab (
echo [+] Enter your Windows Server 2008 serial to continue,
echo or leave it blank to not enter a serial:
set /P serverserial=
echo [+] Stopping Software Licensing services
net stop SLUINotify>con 2>nul
net stop slsvc>con 2>nul
echo [+] Deleting possible tokens_vista.cab backup
del /Q %tokenspath%\tokens_vista.cab>nul 2>&1
echo [+] Backing up tokens.dat to tokens_vista.cab
makecab %tokenspath%\tokens.dat %tokenspath%\tokens_vista.cab
echo [+] Copying the original tokens.dat back
expand %tokenspath%\tokens_original.cab %tokenspath%\tokens.dat
echo [+] Starting "Software Licensing" service again
net start slsvc>con 2>nul
net start SLUINotify>con 2>nul
IF "%serverserial%" == "" (
echo [+] No serial entered... Uninstalling current key...
cscript %windir%\system32\slmgr.vbs -upk
echo [+] Serial deinstalled. Reboot to apply new license!
goto delbak
)ELSE (
echo [+] Applying Server 2008 serial. This may take a while...
cscript %windir%\system32\slmgr.vbs -ipk %serverserial%
IF %ERRORLEVEL% NEQ 0 (
echo [-] Something went wrong, try to do it manually!
goto end
)ELSE (
echo [+] Serial installed! Reboot to apply new license!
goto delbak
)
)
)ELSE (
echo [-] No backup available to revert to!
goto end
)
)ELSE (
echo Usage: pretender.bat [action]
echo Where action is:
echo * apply - Apply the Vista tokens.dat and license to Windows Server 2008
echo * revert - Revert back to the original Windows Server 2008 license
goto end
)
)
)ELSE (
REM reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v ProductName|find /I "Vista">nul
REM IF %ERRORLEVEL% EQU 0 (
echo [+] Copying Vista's tokens.dat to the folder in where this script runs
copy %tokenspath%\tokens.dat .
REM IF %ERRORLEVEL% EQU 0 (
echo [+] Tokens.dat copied succesfully, now copy this script
echo including tokens.dat to your Server 2008 and run it there!
REM goto end
REM )ELSE (
REM echo [-] Something went wrong!
REM goto end
REM )
REM )ELSE (
REM echo [-] Make sure you run this script on Windows 6.x!
REM goto end
REM )
)
:delbak
del %tokenspath%\tokens_original.cab
del %tokenspath%\tokens_vista.cab
:end
color
Code:
Usage: pretender.bat [action]
Where action is:
* apply - Apply the Vista tokens.dat and license to Windows Server 2008
* revert - Revert back to the original Windows Server 2008 license
How to useFist run the tool in Windows Vista, after that copy the files
tokens.dat and
pretender.dat to Windows Server 2008 and run it there using the commandline
pretender.bat apply. After you installed the software that didn't want to install before, return to the Server 2008 license by running
pretender.bat revert. You can view the Vista serial using for example the
WinGuggle freeware tool.
Known bugs/weird problems:- The set /P vistaserial= command doesn't save the input for within the script so the variable can't be used later and the slmgr.vbs -ipk command fails. Workaround is to set the variable before running the script using set vistaserial=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX.
- The error-handling part to copy the tokens.dat file from a Vista PC doesn't work for some reason so I commented it out using the REM keyword.
Only use it if you know what you are doing and only at your own risk!Maybe someone can find out how to fix these bugs because I couldn't find any solution yet...
Good luck!
