|
Answer» Here is what I'd like to accomplish. I can do some DOS batch stuff, but other than that I am a brainless ol fart.
I have two partitions setup with aprox. 4GB each, named PageFile_1 and PageFile-2. I'd like to use only one of them at any given time.
Every couple of weeks, I would like to UNALLOCATED from one partition and allocate to the other partition. After this is DONE I would like to securely wipe the recently used partition so that it is ready for the next swap.
Is this possible via DOS only? I know I can wipe the free space with systernals "sdelete" via a batch file, just don't know if allocating and unallocating the pagefile.sys from partition to partition is possible.
Could use some insight with this.
ThanksPerhaps something like this:
Code: [Select]===== BATCH SCRIPT BEGIN ===== @echo off GOTO menu :menu echo. echo What would you like to do? echo. echo Choice echo. echo Change Pagefile.sys from Drive E: to Drive G: or visa versa echo Q Quit
echo.
:choice set /P C=[e,g,q]? if "%C%"=="q" goto quit if "%C%"=="g" goto SetG if "%C%"=="e" goto SetE goto choice
:SetG echo Set Pagefile.sys to Drive G: at 3000, 3000? pause cls regedit.exe /s DriveG_PageFileSize.REG pause goto menu
:SetE echo Set Pagefile.sys to Drive G: at 3000, 3000? pause cls regedit.exe /s DriveE_PageFileSize.reg pause goto menu
:quit exit :end ===== BATCH SCRIPT END =====
DriveG_PageFileSize.reg Code: [Select]Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management] "PagingFiles"=hex(7):47,00,3a,00,5c,00,70,00,61,00,67,00,65,00,66,00,69,00,6c,\ 00,65,00,2e,00,73,00,79,00,73,00,20,00,33,00,30,00,30,00,30,00,20,00,33,00,\ 30,00,30,00,30,00,00,00,00,00
DriveE_PageFileSize.reg Code: [Select]Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management] "PagingFiles"=hex(7):45,00,3a,00,5c,00,70,00,61,00,67,00,65,00,66,00,69,00,6c,\ 00,65,00,2e,00,73,00,79,00,73,00,20,00,33,00,30,00,30,00,30,00,20,00,33,00,\ 30,00,30,00,30,00,00,00,00,00 I would have to reboot before running sdelete.exe to wipe the cleared drive.The next question, one that arises after exporting the .reg key is: why does the following line...
Code: [Select]NAME TYPE DATA PagingFiles REG_MULTI_SZ E:\pagefile.sys 3000 3000
appear as...
Code: [Select]"PagingFiles"=hex(7):45,00,3a,00,5c,00,70,00,61,00,67,00,65,00,66,00,69,00,6c,\ 00,65,00,2e,00,73,00,79,00,73,00,20,00,33,00,30,00,30,00,30,00,20,00,33,00,\ 30,00,30,00,30,00,00,00,00,00 ...and, is there a way to get the .reg file in the first format, so that it is editable?I really appreciate all the help and suggestions!!
What would I do without you guys!
|