Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

Fix issue #220: sdelete 2.0 is too slow #233

Closed
wants to merge 2 commits into from
Closed

Fix issue #220: sdelete 2.0 is too slow #233

wants to merge 2 commits into from

Conversation

jpmat296
Copy link

Back to SDelete 1.61 thanks to archive.org URL

I don't know if some people would prefer to stay with sdelete 2 since it seems sdelete 2 works well for them.

Back to SDelete 1.61 thanks to archive.org URL
@petemounce
Copy link
Contributor

I've used this diff/fix and can confirm that it works.

@discentem
Copy link

discentem commented Oct 7, 2017

Even with this change, my build still crashes :(

Any ideas?

    virtualbox-iso:
    virtualbox-iso: C: defrag:   100.00% complete, 7 passes needed, fragmented/total = 8/104943
    virtualbox-iso:
    virtualbox-iso: C:\Users\vagrant>cmd /c C:\Windows\System32\reg.exe ADD HKCU\Software\Sysinternals\SDelete /v EulaAccepted /t REG_DWORD /d 1 /f
    virtualbox-iso: The operation completed successfully.
    virtualbox-iso:
    virtualbox-iso: C:\Users\vagrant>cmd /c C:\Windows\Temp\SDelete.exe -q -z C:
    virtualbox-iso: 'C:\Windows\Temp\SDelete.exe' is not recognized as an internal or external command,
    virtualbox-iso: operable program or batch file.
==> virtualbox-iso: Unregistering and deleting virtual machine...
==> virtualbox-iso: Deleting output directory...
Build 'virtualbox-iso' errored: Script exited with non-zero exit status: 1

==> Some builds didn't complete successfully and had errors:
--> parallels-iso: Failed creating Parallels driver: exec: "prlctl": executable file not found in $PATH
--> vmware-iso: Couldn't find VMware tools for 'windows'! VMware often downloads these
tools on-demand. However, to do this, you need to create a fake VM
of the proper type then click the 'install tools' option in the
VMware GUI.
--> virtualbox-iso: Script exited with non-zero exit status: 1

==> Builds finished but no artifacts were created.

@petemounce
Copy link
Contributor

@discentem please post more of your log. It indicates that sdelete.exe was not present in c:\Windows\temp, but without earlier messages one cannot see why.

@discentem
Copy link

@petemounce of course I can't get it fail in the same way again. failed in the above fashion 3 times this morning but not now.

@discentem
Copy link

@petemounce It failed again due to sdelete. Here's the full log:

https://gist.github.com/discentem/7dbd01aeebefb0b3b3c7dd7d19fd0502

@petemounce
Copy link
Contributor

The line that fetches the sdelete zip file

if not exist "C:\Windows\Temp\SDelete.zip" (powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://web.archive.org/web/20140902022253/http://download.sysinternals.com/files/SDelete.zip', 'C:\Windows\Temp\SDelete.zip')"  0<NUL )

is now fetching some HTML rather than the zip file. Using the web archive is inherently quite a brittle way of fetching a dependency, since the behaviour of the URL may change, like it has here.

If you change the line so it downloads http://web.archive.org/web/20140803110527if_/http://download.sysinternals.com/files/SDelete.zip that should work - until the next time it doesn't.

@StefanScherer
Copy link
Collaborator

Closing this, we should use another tool instead of depending of no longer available downloads. A PowerShell native solution mentioned in #220 (comment) would be better.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants