Jump to content

wtarkan

Members
  • Posts

    6
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

wtarkan's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Sometimes we don't understand people, for example he stole the codes (v1.0) that we are still developing and tried to get you to convert them to Autoit. HUH, what can we say? The code is now improved (v1.3), but there are still some bugs. <snip>
  2. If I create a service to run a program , Application window cannot Appear - How can I make the App window visible
  3. Ah , thank you very much , Problem solved
  4. yes , diskpart work but I don't want to use it , the Above codes identify the disk status as Offline but can not change it to online and that is exactly my problem Thanks
  5. Thank you but I have already tried it disk 1 was Offline The code give me \\.\PHYSICALDRIVE1 Offline message but It can not be capable to make the Disk Online I could not find the error , Thank you
  6. Hi , I Need to Change the Status of a Disk to Offline or Online Without Diskpart I have tried all possibilities but no success , Finally find a C++ code but not sure if it is possible to convert it Autoit format , Or maybe somenone can help me to do it with autoit Here is the code BOOL disk_offline(HANDLE h_file, bool enable){ DWORD bytes_returned = 0; BOOL b_offline = 0; if(get_size_volume_disk(h_file)){ SET_DISK_ATTRIBUTES disk_attr; ZeroMemory(&disk_attr, sizeof(disk_attr)); disk_attr.Version = sizeof(SET_DISK_ATTRIBUTES); disk_attr.Attributes = enable? DISK_ATTRIBUTE_OFFLINE: 0; disk_attr.AttributesMask = DISK_ATTRIBUTE_OFFLINE; b_offline = DeviceIoControl(h_file, IOCTL_DISK_SET_DISK_ATTRIBUTES, &disk_attr, disk_attr.Version, NULL, 0, &bytes_returned, NULL); // Invalidates the cached partition table and re-enumerates the device. if(!enable) BOOL b_update = DeviceIoControl(h_file, IOCTL_DISK_UPDATE_PROPERTIES, NULL, 0, NULL, 0, &bytes_returned, NULL); } return b_offline; } Source http://tiku.io/questions/502405/take-disks-online-offline
×
×
  • Create New...