Jump to content

Disk Gizleme/gösterme Işlemi Auoit Ile Nasıldır?


x_files_x
 Share

Recommended Posts

Mrb arkadaşlar , benim yapmak istedigim şey diyeliki bir f: diskim var bu diski bir hotkeye atayarak diyrelimki ctrl+l  ye bastıgımda unmount olsun yani sistemden kaldırılsın, sonra başka bi hotkey ile tekrar sisteme gelsin, burdaki mantık sanırım autoit ile sürücü harfini siliyor gibi ben tam bilmiyorum ama örnek icin Bluelife hocanın Blue mount programındaki mount/unmount ozelligini diorum, fikirlerinizi bekliyorum tşkler

Link to comment
Share on other sites

Ufak bi arama yapsan bulabilirsin;

http://www.tnctr.com/topic/204127-disk-drive-administrator-10-beta/

Burda reg kayıtları var. Auotile sürücüleri listelersin sonra kayıtları bir diziye atarak comboda belirtirsin secilen sürücüyü gizler veya gösterirsin işlem sonunda explorer i de bi refresh yaptın mı tadından yenmez.Ayıca her şeyin örneği de olmak zorunda değil sende yaz ki örneği olsun ;)

 

// Aşağıdaki registry kodu Sürücü gizlemek için kullanılır.
// çalışma şekli ise A-Z ye kadar her harf için dword analtılık sayısının
// ikilik düzendeki kaşılığındaki her bit bir sürücüyü temsil ediyor
// Bu anahtarları kontrol eden uygulama da yazılabilir )

[HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Policies\Explorer]
"NoDrives"=dword:00000001 // A sürücüsünü gizle 00001

[HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Policies\Explorer]
"NoDrives"=- // Hepsini göster

[HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Policies\Explorer]
"NoDrives"=dword:00000002 // B sürücüsünü gizle 00010

[HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Policies\Explorer]
"NoDrives"=-

[HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Policies\Explorer]
"NoDrives"=dword:00000004 // C sürücüsünü gizle 00100

[HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Policies\Explorer]
"NoDrives"=-

[HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Policies\Explorer]
"NoDrives"=dword:00000008 // D sürücüsünü gizle 01000

[HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Policies\Explorer]
"NoDrives"=-

[HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Policies\Explorer]
"NoDrives"=dword:00000010 // E sürücüsünü gizle 10000

[HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Policies\Explorer]
"NoDrives"=-
Edited by SimpsoN_Bart
Link to comment
Share on other sites

Anladığım kadarıyla sabit bir bilgisayarda bu işlemi gerçekleştirmek istiyorsun. Öncelikle sürücünün gerçek yolunu bulmalısın. Bunun için komut istemini aç ve moutvol yazıp entera bas. Karşına bir takım bilgiler gelecektir. Istediğin sürücünün yolunu/konumunu bulduktan sonra aşağıdaki değişkenleri düzeltirsin..
Benim bilgisayarım için verdiğim örnek...

Local $VolumePoint = "\\?\Volume{cfabc5ca-6bf0-11e2-aa02-005056c00008}\"
Local $VolumeChar = "V:\"

If FileExists($VolumePoint) = 0 Then
	MsgBox(16,$VolumeChar,	"$VolumePoint değişkenindeki bilgi hatalı!")
	Exit
EndIf

_DeleteVolumeMountPoint($VolumeChar)
MsgBox(64,$VolumeChar,"Sürücü çıkartıldı!")
_SetVolumeMountPoint($VolumeChar,$VolumePoint)
MsgBox(64,$VolumeChar,"Sürücü takıldı!")

Func _DeleteVolumeMountPoint($lpszVolumeMountPoint)
	Local $ret = DllCall("kernel32.dll", "hwnd", "DeleteVolumeMountPointW", "wstr", $lpszVolumeMountPoint)
	If $ret[0] <> 0 Then
		Return 1
	Else
		Return 0
	EndIf
EndFunc   ;==>_DeleteVolumeMountPoint

Func _SetVolumeMountPoint($lpszVolumeMountPoint, $lpszVolumeName)
	Local $ret = DllCall("kernel32.dll", "int", "SetVolumeMountPointW", "wstr", $lpszVolumeMountPoint, "wstr", $lpszVolumeName)
	Return $ret[0]
EndFunc   ;==>_SetVolumeMountPoint
Link to comment
Share on other sites

Bluelife hocam verdiginiz kodları düzenleyip calıstırdıgımda disk cıkartıldı takıldı diyor ama bişi olmuyor sadece uyarı geliyor



Anladığım kadarıyla sabit bir bilgisayarda bu işlemi gerçekleştirmek istiyorsun. Öncelikle sürücünün gerçek yolunu bulmalısın. Bunun için komut istemini aç ve moutvol yazıp entera bas. Karşına bir takım bilgiler gelecektir. Istediğin sürücünün yolunu/konumunu bulduktan sonra aşağıdaki değişkenleri düzeltirsin..
Benim bilgisayarım için verdiğim örnek...

Local $VolumePoint = "\\?\Volume{cfabc5ca-6bf0-11e2-aa02-005056c00008}\"
Local $VolumeChar = "V:\"

If FileExists($VolumePoint) = 0 Then
	MsgBox(16,$VolumeChar,	"$VolumePoint değişkenindeki bilgi hatalı!")
	Exit
EndIf

_DeleteVolumeMountPoint($VolumeChar)
MsgBox(64,$VolumeChar,"Sürücü çıkartıldı!")
_SetVolumeMountPoint($VolumeChar,$VolumePoint)
MsgBox(64,$VolumeChar,"Sürücü takıldı!")

Func _DeleteVolumeMountPoint($lpszVolumeMountPoint)
	Local $ret = DllCall("kernel32.dll", "hwnd", "DeleteVolumeMountPointW", "wstr", $lpszVolumeMountPoint)
	If $ret[0] <> 0 Then
		Return 1
	Else
		Return 0
	EndIf
EndFunc   ;==>_DeleteVolumeMountPoint

Func _SetVolumeMountPoint($lpszVolumeMountPoint, $lpszVolumeName)
	Local $ret = DllCall("kernel32.dll", "int", "SetVolumeMountPointW", "wstr", $lpszVolumeMountPoint, "wstr", $lpszVolumeName)
	Return $ret[0]
EndFunc   ;==>_SetVolumeMountPoint

Hocam verdiginiz kodları düzenleyip calıstırdıgımda disk cıkartıldı filan diyor ama hic bi degisiklik olmuyor

Link to comment
Share on other sites

@x_files_x

Heralde Nt6 tabanlı bir sistem kullanıyorsun. Kısaca bu işlemler için yönetici yetkileri gerekir. Bunun için kodların başına #RequireAdmin komutunu ekle. Veyahut System32 de bulunan mountvol programı ilede istediğini yapabilirsin. Çalışmalarında başarılar dilerim kolay gelsin...

#RequireAdmin
Local $VolumePoint = "\\?\Volume{cfabc5ca-6bf0-11e2-aa02-005056c00008}\"
Local $VolumeChar = "V:\"
 
If FileExists($VolumePoint) = 0 Then
MsgBox(16,$VolumeChar,	"$VolumePoint değişkenindeki bilgi hatalı!")
Exit
EndIf
 
_DeleteVolumeMountPoint($VolumeChar)
MsgBox(64,$VolumeChar,"Sürücü çıkartıldı!")
_SetVolumeMountPoint($VolumeChar,$VolumePoint)
MsgBox(64,$VolumeChar,"Sürücü takıldı!")
 
Func _DeleteVolumeMountPoint($lpszVolumeMountPoint)
Local $ret = DllCall("kernel32.dll", "hwnd", "DeleteVolumeMountPointW", "wstr", $lpszVolumeMountPoint)
If $ret[0] <> 0 Then
Return 1
Else
Return 0
EndIf
EndFunc ;==>_DeleteVolumeMountPoint
 
Func _SetVolumeMountPoint($lpszVolumeMountPoint, $lpszVolumeName)
Local $ret = DllCall("kernel32.dll", "int", "SetVolumeMountPointW", "wstr", $lpszVolumeMountPoint, "wstr", $lpszVolumeName)
Return $ret[0]
EndFunc ;==>_SetVolumeMountPoint
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...