Page 1 of 2

VB Scripts

Posted: 2014-06-10 21:57
by PROBLEMCHYLD
Does anyone here no how to create VB Scripts. I need a VBS to disable the Recycle Bin, but giving you the option to choose which drive to disable.

Posted: 2014-06-11 00:43
by RFMaster
http://msdn.microsoft.com/en-us/library/yfdfhz1b.aspx

And your target is -> [HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionexplorerBitBucket]

Posted: 2014-06-11 01:50
by !
I saved that page which RFMaster linked to in here. Microsoft MSDN URLs tend to die a hard death and I hate dead links. :oops:

RegWrite Method_files.zip
(47.21 KiB) Downloaded 845 times

Posted: 2014-06-25 20:10
by PROBLEMCHYLD
Can anyone write up one?

Posted: 2014-06-25 23:23
by Steven W
PROBLEMCHYLD, I'm on XP and under:

HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionexplorerBitBucket

There's keys for my drives c,d,f:

Reg.jpg
Reg.jpg (31.71 KiB) Viewed 18759 times


Anyway, this works for me:

Code: Select all

Dim WshShell, bKey
Set WshShell = WScript.CreateObject("WScript.Shell")

WshShell.RegWrite "HKLMSoftwareMicrosoftWindowsCurrentVersionexplorerBitBucketCNoRecycleFiles", &H00000001&, "REG_DWORD"


The Dword "NoRecycleFiles" and its value were created by the script. Not sure if this would suit your needs.

Posted: 2014-06-25 23:49
by RFMaster
Which OS is target?

Posted: 2014-06-26 00:01
by PROBLEMCHYLD
Win98

Posted: 2014-06-26 00:20
by RFMaster
Ok.

It's complicated on Win9x

i'll start to work on it tomorrow.

Posted: 2014-06-27 06:16
by RFMaster
This RegWrite f**cn shit do not support writing more then 4 bytes of binary data". "PurgeInfo" Key is 72 bytes of binary data.

^PROBLEMCHYLD, Is it necessary to be VBScript?

I can write a "normal" program for such purposes, if you want?

Posted: 2014-06-27 21:36
by PROBLEMCHYLD
I need it in VB Script if you can do it. It will be needed in the SP, one of the reasons I haven't released 3.34 yet. Its no rush, take your time.