Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Putting chrome on a ramdisk


  • Please log in to reply
1 reply to this topic

#1 superking75

superking75

  • Members
  • 155 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:01:12 AM

Posted 04 April 2016 - 03:37 PM

So far I have tried putting chrome's temp files on a ram disk and i am pretty happy with how it is working. (By the way i currently have a HDD in my system and 12Gb of ram, the most I've seen used is 8Gb.) My question is will their be any problems with this. I plan to make sure that the software backs up the ram disk to the actual HDD when i shut down and load it back up when i startup. Would i have to install chrome to the ram disk? 

 

Thanks in advance for the help guys.

                                                             Superking75



BC AdBot (Login to Remove)

 


#2 dhjohns

dhjohns

  • Members
  • 159 posts
  • OFFLINE
  •  
  • Local time:06:12 AM

Posted 13 April 2016 - 01:40 AM

OK, It can be done. The problem is keeping it there after logging off, shutting down or restarting. So I developed a solution. This works. First you set up your RAM drive to start with Windows. MAKE SURE IT IS Z-DRIVE!!!! I have mine set for 1 GB. Then (for all these files to work the way they are written) create a folder on your C-drive called ChromeCache. All the following files I am outlining for you go into the ChromeCache folder. All these files can be made by copying into Notepad.exe and renaming them properly with the correct extension. Make sure Hide Extensions for Known File Types is not checked in Folder Options.

1) Create a cmd file containing this code
copy "F:\RamDriveIcon\Autorun.inf" Z:\
copy "F:\RamDriveIcon\Drive.ico" Z:\
mkdir Z:\Cache
and name it CreateCacheFolder.cmd

2) Create a vbs file containing this code
Dim WinScriptHost
Set WinScriptHost = CreateObject("WScript.Shell")
WinScriptHost.Run Chr(34) & "C:\ChromeCache\CreateCacheFolder.cmd" & Chr(34), 0
Set WinScriptHost = Nothing
and name it CreateCacheFolder.vbs

3) Create a cmd file containing this code
if exist "%USERPROFILE%\AppData\Local\Google\Chrome\User Data\Default\Cache" takeown/f "%USERPROFILE%\AppData\Local\Google\Chrome\User Data\Default\Cache" /r /d y
if exist "%USERPROFILE%\AppData\Local\Google\Chrome\User Data\Default\Cache" icacls "%USERPROFILE%\AppData\Local\Google\Chrome\User Data\Default\Cache" /grant "Everyone":F /t /q
if exist "%USERPROFILE%\AppData\Local\Google\Chrome\User Data\Default\Cache" rmdir /s "%USERPROFILE%\AppData\Local\Google\Chrome\User Data\Default\Cache" /Q
mklink /D "%USERPROFILE%\appdata\local\google\chrome\user data\default\cache" Z:\Cache\
and name it MakeLink.cmd

4) Create a vbs file containing this code
Dim WinScriptHost
Set WinScriptHost = CreateObject("WScript.Shell")
WinScriptHost.Run Chr(34) & "C:\ChromeCache\MakeLink.cmd" & Chr(34), 0
Set WinScriptHost = Nothing
and name it MakeLink.vbs

5) Create a xml file containing this code
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
  <RegistrationInfo>
    <Date>2016-03-27T22:49:08.7267383</Date>
    </RegistrationInfo>
  <Triggers>
    <LogonTrigger>
      <Enabled>true</Enabled>
      <Delay>PT3S</Delay>
    </LogonTrigger>
  </Triggers>
  <Principals>
    <Principal id="Author">
      <GroupId>S-1-5-32-545</GroupId>
      <RunLevel>HighestAvailable</RunLevel>
    </Principal>
  </Principals>
  <Settings>
    <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
    <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
    <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
    <AllowHardTerminate>true</AllowHardTerminate>
    <StartWhenAvailable>false</StartWhenAvailable>
    <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
    <IdleSettings>
      <StopOnIdleEnd>true</StopOnIdleEnd>
      <RestartOnIdle>false</RestartOnIdle>
    </IdleSettings>
    <AllowStartOnDemand>true</AllowStartOnDemand>
    <Enabled>true</Enabled>
    <Hidden>false</Hidden>
    <RunOnlyIfIdle>false</RunOnlyIfIdle>
    <DisallowStartOnRemoteAppSession>false</DisallowStartOnRemoteAppSession>
    <UseUnifiedSchedulingEngine>true</UseUnifiedSchedulingEngine>
    <WakeToRun>false</WakeToRun>
    <ExecutionTimeLimit>PT72H</ExecutionTimeLimit>
    <Priority>7</Priority>
  </Settings>
  <Actions Context="Author">
    <Exec>
      <Command>CreateCacheFolder.vbs</Command>
      <WorkingDirectory>C:\ChromeCache\</WorkingDirectory>
    </Exec>
  </Actions>
</Task>
and name it CreateCacheFolder.xml

6) Create a xml file containing this code
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
  <RegistrationInfo>
   <Description>Creates a Symbolic Link</Description>
    <URI>\MakeLink</URI>
  </RegistrationInfo>
  <Triggers>
    <LogonTrigger>
      <Enabled>true</Enabled>
      <Delay>PT5S</Delay>
    </LogonTrigger>
  </Triggers>
  <Principals>
    <Principal id="Author">
      <GroupId>S-1-5-32-545</GroupId>
      <RunLevel>HighestAvailable</RunLevel>
    </Principal>
  </Principals>
  <Settings>
    <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
    <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
    <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
    <AllowHardTerminate>true</AllowHardTerminate>
    <StartWhenAvailable>false</StartWhenAvailable>
    <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
    <IdleSettings>
      <StopOnIdleEnd>true</StopOnIdleEnd>
      <RestartOnIdle>false</RestartOnIdle>
    </IdleSettings>
    <AllowStartOnDemand>true</AllowStartOnDemand>
    <Enabled>true</Enabled>
    <Hidden>false</Hidden>
    <RunOnlyIfIdle>false</RunOnlyIfIdle>
    <DisallowStartOnRemoteAppSession>false</DisallowStartOnRemoteAppSession>
    <UseUnifiedSchedulingEngine>true</UseUnifiedSchedulingEngine>
    <WakeToRun>false</WakeToRun>
    <ExecutionTimeLimit>PT72H</ExecutionTimeLimit>
    <Priority>7</Priority>
  </Settings>
  <Actions Context="Author">
    <Exec>
      <Command>MakeLink.vbs</Command>
      <WorkingDirectory>C:\ChromeCache\</WorkingDirectory>
    </Exec>
  </Actions>
</Task>
and name it MakeLink.xml You should now have a total of six files in the ChromeCache folder.

7) Open Task Scheduler.

8) You can now import the tasks into Task Scheduler by selecting import and then selecting each xml file. Now all you need do is restart, or log off then back on.

I do not know why you would want to back up the cache to the physical disk when shutting down. But if you do, you would need to write a shutdown program for that, and use only that. It doesn't make sense to me. There isn't really anything worth saving in there.

Edited by dhjohns, 13 April 2016 - 01:47 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users