I have a visual basic script I found years ago, I would like to know if it can be entirely or at least roughly translated into batch format. The goal is to convert the script to batch format, so that I can use BAT to EXE to convert the resulting batch file into an executable binary. The script hides or shows hidden files, here's the scripts contents:
Hidden = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden"
SSHidden = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden"
Set Command1 = WScript.CreateObject("WScript.Shell")
Set command2 = CreateObject("Wscript.Shell")
Check = Command1.RegRead(Hidden)
If Check = 2 Then
Command1.RegWrite Hidden, 1, "REG_DWORD"
Command1.RegWrite SSHidden, 1, "REG_DWORD"
Else
Command1.RegWrite Hidden, 2, "REG_DWORD"
Command1.RegWrite SSHidden, 0, "REG_DWORD"
End If
Command1.SendKeys "{F5}"
WScript.sleep 1000
I'm not a professional programmer, but I have seen VBS translated to batch before, I just don't know all of the ins-and-outs of how to do so. I could make two batch scripts, one to hide, one to show, but the VBS script does both. I would like to retain this singularity. Thanks in advance.