Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recycle bin feature #18

Open
thesushil opened this issue Aug 3, 2020 · 6 comments
Open

Recycle bin feature #18

thesushil opened this issue Aug 3, 2020 · 6 comments

Comments

@thesushil
Copy link

Please add a feature so that the files deleted from the virtual drive go into recycle bin. Thank you.

@ildar-shaimordanov
Copy link
Owner

It is hardly possible to implement the requested feature in easy way so to make it working automatically. I recommend you to do it manually following the steps as it's explained in this QA: https://superuser.com/questions/222747/recycle-bin-on-substed-drives.

@Artoria2e5
Copy link
Contributor

Artoria2e5 commented Oct 7, 2020

Please reopen this. Your objection is on the ground that it "only works for a single subst", while in reality this is only causes by a fixed GUID. A GUID can be trivially generated using PowerShell. If we don't have PS, we can even just use 123e4567-e89b-42d3-a456-1337950b57XY for all we care, where XY is the hexadecimal ASCII of the drive number and 950b57 is an awful encoding of psubst.

@ildar-shaimordanov
Copy link
Owner

There are two issues already about the same thing: the issue #19 and this one.

Besides that there is stuff mentioned in https://github.com/ildar-shaimordanov/psubst/blob/master/TODO. I think the recycler is the tool you could like as the workaround to enable recycle bin for substed drives.

@Artoria2e5
Copy link
Contributor

The UUID thing I have solved with a new subroutine

:psubst_uuid
echo WScript.Echo Hex(Asc(WScript.Arguments(0))) > "%TEMP%\%~n0.hex.vbs"
for /f %%L in ('"%TEMP%\%~n0.hex.vbs" "!psubst_persist_disk!"') do set "uuid={123e4567-e89b-42d3-a456-1337950b57%%L}"
goto :EOF

But the elevated reg thing is starting to look awful as I must run multiple reg commands, so multiple sudo dances. Duh...

@ildar-shaimordanov
Copy link
Owner

I see necessity in implementing this feature. However let's minimize any pollution to the main script. Enabling the recycle bin is not the main functionality of the psubst tool. It should be implemented as another tool turning on/off the recycle bin for SUBSTed drives.

@sergeevabc
Copy link

sergeevabc commented May 18, 2021

Enabling Recycle bin is not the main functionality of the Psubst tool. It should be implemented as another tool…

@ildar-shaimordanov, I disagree. Using Psubst is like plugging in another internal or external drive and Recycle bin is a property of any fixed drive on Windows OS that an average user expects to have out of the box. For example, if X: is mapped to C:\ and C:\ uses Recycle bin, then X: is expected to inherit that. It is an enlightened geeky admin who is aware of the current pitfalls, but an average user suffers, because one’s files, in case of deletion, are suddenly gone with no way to retrieve them back easily. To reduce the amount of suffering, Psubst should be improved. I don’t know how, since am not a developer, but you are (CV claims that).

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

No branches or pull requests

4 participants