Moving the Pagefile.sys to D:
Hi,
Just got tasked to create a MSI that changes the location of the Swap/Page file from C: to D: to free up disk space. I created the MSI to make the needed changes in; (in case your interested)
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Memory Management] "PagingFiles"= D:\Pagefile.sys 2046 4092
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet003\Control\Session Manager\Memory Management] "PagingFiles"= D:\Pagefile.sys 2046 4092
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management] "PagingFiles"= D:\Pagefile.sys 2046 4092
After the reboot the new pagefile.sys is created on the root of D: but my problem is that the old pagesfile.sys remains on the C: drive taking up space. What are some ways to remove the old unneeded pagefile.sys.
Even thou it’s still a system file that remains hidden, a right mouse click and the file deletes no problem. How could a initiate a “attrib –s –h pagefile.sys command and a delete after a reboot?
Thanks!
Just got tasked to create a MSI that changes the location of the Swap/Page file from C: to D: to free up disk space. I created the MSI to make the needed changes in; (in case your interested)
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Memory Management] "PagingFiles"= D:\Pagefile.sys 2046 4092
[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet003\Control\Session Manager\Memory Management] "PagingFiles"= D:\Pagefile.sys 2046 4092
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management] "PagingFiles"= D:\Pagefile.sys 2046 4092
After the reboot the new pagefile.sys is created on the root of D: but my problem is that the old pagesfile.sys remains on the C: drive taking up space. What are some ways to remove the old unneeded pagefile.sys.
Even thou it’s still a system file that remains hidden, a right mouse click and the file deletes no problem. How could a initiate a “attrib –s –h pagefile.sys command and a delete after a reboot?
Thanks!
0 Comments
[ + ] Show comments
Answers (9)
Please log in to answer
Posted by:
AngelD
17 years ago
Have you tried using the PendingFileRenameOperations to remove the file during reboot (startup)?
http://www.jsifaq.com/SF/Tips/Tip.aspx?id=0578
From the above link: to remove the file just leave "Line 2" blank.
http://www.jsifaq.com/SF/Tips/Tip.aspx?id=0578
From the above link: to remove the file just leave "Line 2" blank.
Posted by:
JdotQ
17 years ago
(just throwing this out there)
You could create a CustomAction which deletes the file via a VBScript and place it in the sequence after ScheduleReboot?
This might be a sloppy way to do it, but I think it will accomplish the goal...
(maybe some of the veterans around the forum can correct me if I'm wrong?)
You could create a CustomAction which deletes the file via a VBScript and place it in the sequence after ScheduleReboot?
This might be a sloppy way to do it, but I think it will accomplish the goal...
(maybe some of the veterans around the forum can correct me if I'm wrong?)
Posted by:
jmcfadyen
17 years ago
Posted by:
Trooper23
17 years ago
Posted by:
Trooper23
17 years ago
Posted by:
Trooper23
17 years ago
Posted by:
jmcfadyen
17 years ago
Posted by:
JdotQ
17 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.