none
WSIM - Disable hiberfil.sys in Unattended Install

    Question

  • Using WSIM, how do you delete/disable the hiberfil.sys (hibernation) file in the root of C:?  I have tried a couple of diferent ways, but none work.

    In Specialize:

    Using a RunSynchronous command (powercfg -H off)

    Using a RunSynchronous command (cmd /c powercfg -H off)

    I am guessing these don't work because you need an elevated command prompt to delete hiberfil.sys.    So how do you do this in WSIM?

    Sunday, August 26, 2012 5:49 PM

Answers

  • I got it.    Since using the powercfg command just did not work, even when using the credentials, I decided to do it via the registry.   Using setupcomplete.cmd is a valid suggestion, but I wanted to disable it using just WSIM.   I added the following in the Path field in a RunSynchronous command in the Specialize pass, no credentials needed:

    reg add HKLM\SYSTEM\CurrentControlSet\Control\Power /v HibernateEnabled /t REG_DWORD /d  00000000 /f

    Thanks All for the suggestions !

    Friday, August 31, 2012 12:08 PM

All replies

  • I use SetupComplete.cmd, runs w/local system privilege, avoids the WSIM alltogether.   Just needs to be in the "%WINDIR%\Setup\Scripts\SetupComplete.cmd" location and the install will run it.

    http://technet.microsoft.com/en-us/library/cc766314%28v=ws.10%29.aspx

    powercfg /hibernate off


    Don't forget to mark your posts as answered so they drop off the unanswered post filter.


    Tuesday, August 28, 2012 8:44 PM
  • if you don't like setupcomplete.cmd, you can alternatively specify elevated credentials for the Synchronous commands.  Either way should work. 

       <RunSynchronousCommand>
          <Order>1</Order>
          <Path>\\MyNetworkShare\MyApplication.exe</Path>
          <Description>DescriptionOfMyApplication</Description>
          <Credentials>
             <Domain>FabrikamDomain</Domain>
             <UserName>MyUserName</UserName>
             <Password>MyPassword</Password>
          </Credentials>
       </RunSynchronousCommand>

    Don't forget to mark your posts as answered so they drop off the unanswered post filter.




    Wednesday, August 29, 2012 4:39 AM
  • I believe that Hibernation is by default disabled in Windows 8 install...
    Wednesday, August 29, 2012 7:14 PM
  • No...it's not disabled.   Just look in the root of C: after the install.

    Thursday, August 30, 2012 2:41 AM
  • Thanks.   I was thinking of using the domain credentials, but since the computer will not be a domain member until after the install, I was not sure it would work.   But I will give it a try.


    Thursday, August 30, 2012 2:43 AM
  • I got it.    Since using the powercfg command just did not work, even when using the credentials, I decided to do it via the registry.   Using setupcomplete.cmd is a valid suggestion, but I wanted to disable it using just WSIM.   I added the following in the Path field in a RunSynchronous command in the Specialize pass, no credentials needed:

    reg add HKLM\SYSTEM\CurrentControlSet\Control\Power /v HibernateEnabled /t REG_DWORD /d  00000000 /f

    Thanks All for the suggestions !

    Friday, August 31, 2012 12:08 PM