luis713 Posted November 8, 2012 Share Posted November 8, 2012 how can i change the values in the next image? Link to comment Share on other sites More sharing options...
spudw2k Posted November 8, 2012 Share Posted November 8, 2012 (edited) Typically you can manipulate the window's radio button if you identify it using AutoIt Window tool and then use Control funcs to select the radio button you want. You could also implement the registry hack as described here http://forum.sysinternals.com/removable-drives-write-catching-option-option_topic18601_post94754.html#94754 , but I'm not sure if it will be effective 'real-time" or if it becomes effective the next time the removable device is plugged in. edit: forgot the link...derp Edited November 8, 2012 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
luis713 Posted November 8, 2012 Author Share Posted November 8, 2012 if i use autoit window, do i need open first my pc, then clic on drive properties, and open all the neccesaries Windows in my code or all the radios on Windows have a different identifier? pd. i want to do this procces in hidden way Link to comment Share on other sites More sharing options...
spudw2k Posted November 8, 2012 Share Posted November 8, 2012 Yes, you'd have to open the properties window, and switch to the tab.There are various ways to do this and even make it hidden but it's all smoke and mirrors at that point....i want to do this procces in hidden wayI'd recommend the registry method then. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
luis713 Posted November 8, 2012 Author Share Posted November 8, 2012 ok, i'll try it. thanks Link to comment Share on other sites More sharing options...
luis713 Posted November 8, 2012 Author Share Posted November 8, 2012 is there another method? i think could be posible calling a dll, but i don't know which dll, modifying registry won't be my best choice because the registry deppends of the drive, i need to know drive's name and other things Link to comment Share on other sites More sharing options...
spudw2k Posted November 9, 2012 Share Posted November 9, 2012 (edited) I'm not finding a dll method, but I'm no expert. You could use the function below to retrieve the proper device id/reg path for a known drive letter. expandcollapse popup$drive = StringLeft(FileSelectFolder("Pick a Drive",""),2) $id = _GetPNPDeviceID($drive,1) msgbox(0,"",$id) Func _GetPNPDeviceID($drive,$fullid=0) $objWMIService = ObjGet("winmgmts:{impersonationLevel=Impersonate}!.rootcimv2") If Not IsObj($objWMIService) Then Return -1 ;Failed to Connect to WMI on Local Machine $colDevice = $objWMIService.ExecQuery("SELECT * from Win32_LogicalDiskToPartition") $var="" For $objItem in $colDevice If StringInStr($objItem.Dependent,$drive) Then $var=StringTrimLeft($objItem.Antecedent,stringInstr($objItem.Antecedent,"=")) EndIf Next If Not $var Then Return -2 ;Failed to Find Drive Letter $colDevice = $objWMIService.ExecQuery("SELECT * from Win32_DiskDriveToDiskPartition") $diskpartition = $var $var="" For $objItem in $colDevice If StringInStr($objItem.Dependent,$diskpartition) Then $var=StringTrimLeft($objItem.Antecedent,stringInstr($objItem.Antecedent,"=")) EndIf Next If Not $var Then Return -3 ;Failed to Find Physical Drive # $colDevice = $objWMIService.ExecQuery("SELECT * from Win32_DiskDrive") $physicaldrive = StringReplace(StringReplace($var,"",""),'"',"") $var="" For $objItem in $colDevice If $objItem.DeviceID = $physicaldrive Then $var=$objItem.PNPDeviceID EndIf Next If Not $var Then Return -4 ;Failed to Find PNPDeviceID If Not $fullid Then $var = StringTrimLeft($var,StringInstr($var,"",0,-1)) ;Return Ugly Full PNPDeviceID Return $var EndFunc There is still the issue of when making the setting take effect. You could either remove and re-insert the device or use more trickery of sorts to automate it. Edited November 9, 2012 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
luis713 Posted November 9, 2012 Author Share Posted November 9, 2012 Thanks, this code works. thanks for helping Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now