Soyez le premier à donner votre avis sur cette source.
Snippet vu 13 391 fois - Téléchargée 38 fois
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
15 févr. 2005 à 20:28
Shell "cmd /c net share mon_partage=C:\Docs"
mais il y a beaucoup de commandes net, et pour savoir tout ce qu'on peut faire avec on fait : net /?
puis pour une commande precise : net help commande,
ex : net help share, ou net help use...
16 janv. 2005 à 12:56
On l'utilise comment? C'est une instruction VB ou une commande MS-DOS qu'il faut lancer depuis VB?
15 sept. 2004 à 19:11
--> Net Share NomDePartage=Chemin
Exemple : Net Share C=C:
Dans une invite de commandes, tapes Net Share /? pour voir les possibilités :)
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.