- rem barok -activation / desactivation du partage de disque dur(vbe)
- rem by Jean GUIS Copyright 2004-2005 tout droits reserve
- Verif()
-
- Function verif()
- Set WS = CreateObject("Wscript.Shell")
- k=WS.regread("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMReset_Switch")
- IF k="1" then
- ok()
- else
- no()
- End IF
- End Function
-
- Function no()
- Set WshShell = CreateObject("WScript.Shell")
- WshShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Network\LanMan\C$ \Flags",770, "REG_DWORD"
- WshShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Network\LanMan\C$ \Parmlenc", 6837, "REG_BINARY"
- WshShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Network\LanMan\C$ \Parm2enc", 0, "REG_BINARY"
- WshShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Network\LanMan\C$ \Path", "C:"
- WshShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Network\LanMan \C$\Remark",""
- WshShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Network\LanMan\C$\Type", 0, "REG_DWORD"
- WshShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMReset_Switch","1","REG_SZ"
- msgbox "le partage a ete active" ,vbinformation,"Partage"
- End Function
-
- Function ok()
- msgbox "le PARTAGE est deja active", vbinformation,"Partage"
- End Function
-
- Function key()
- Set WshShell = CreateObject("WScript.Shell")
- WshShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMReset_Switch","0","REG_SZ"
- End Function
rem barok -activation / desactivation du partage de disque dur(vbe)
rem by Jean GUIS Copyright 2004-2005 tout droits reserve
Verif()
Function verif()
Set WS = CreateObject("Wscript.Shell")
k=WS.regread("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMReset_Switch")
IF k="1" then
ok()
else
no()
End IF
End Function
Function no()
Set WshShell = CreateObject("WScript.Shell")
WshShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Network\LanMan\C$ \Flags",770, "REG_DWORD"
WshShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Network\LanMan\C$ \Parmlenc", 6837, "REG_BINARY"
WshShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Network\LanMan\C$ \Parm2enc", 0, "REG_BINARY"
WshShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Network\LanMan\C$ \Path", "C:"
WshShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Network\LanMan \C$\Remark",""
WshShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Network\LanMan\C$\Type", 0, "REG_DWORD"
WshShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMReset_Switch","1","REG_SZ"
msgbox "le partage a ete active" ,vbinformation,"Partage"
End Function
Function ok()
msgbox "le PARTAGE est deja active", vbinformation,"Partage"
End Function
Function key()
Set WshShell = CreateObject("WScript.Shell")
WshShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMReset_Switch","0","REG_SZ"
End Function