Jump to content

JackMac4

Members
  • Posts

    6
  • Joined

  • Last visited

JackMac4's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Thanks for catching that glaring oversight on my part - I'd still be interested in a better method of catching this PID if anyone has any ideas.
  2. I'm having difficulty trapping and waiting on a program that I'm calling, primarily because it spawns a lot of sub processes. I've isolated the main thread that get's spun, but it always has a random number attached to the end. The process is called _is##.exe, with ## being replaced by a seemingly random number. $PID = Run("Z:\SAUCE\setup.exe") Do $list = ProcessList() For $i = 1 to $list[0][0] If StringTrimLeft($list[$i][0],3) = "_is" Then $PID = $list[$i][1] ExitLoop MsgBox(0,$PID,$list[$i][0]) EndIf Next Sleep(250) Until ProcessExists($PID) = 0 Is there a better way to do this - because this way isn't working. Thanks in advance!
  3. I've found plenty of threads and discussions pertaining to functions related to working with lists of available drives, but what I need is a list of all other drives. I presume I could accomplish this by iterating through the alphabet and comparing the results to a list of DriveGetDrive("all"), but it seems awefully cumbersome. Is there a better method someone could suggest? I need to find 10 available drive letters and fill an array with those results in order to do some mapping. Thanks in advance!
  4. Thank you so much! I believe that little nugget of information was exactly what I needed. I was hoping there was a simpler way of doing it!
  5. $path=StringToASCIIArray("test") Dim $newpath = "" For $i = 0 to UBound($path)-1 $newpath += $path[$i] $newpath += 0 Next MsgBox(0,"",StringFromASCIIArray($newpath)) this simply yields me null - and is my attempt at adding the null values to just a regular string. could someone help steer me in the right direction here?
  6. I've been scouring for a day or two now and am having some difficulty coming up with a good method to tackle a problem I have. I need to write a registry value in binary, which in itself is no problem. The value that I need to write needs to be converted from a string value - also not a big deal, but I need to manipulate this string in order for it to be properly formatted and that's where I'm stuck. $file = "filename.iso" $path = ";C:\Documents and Settings\All Users\Application Data\Program\"&$file For $i = 0 to UBound($path)-1 $value+=$path[$i]+Chr(0) Next RegWrite("HKEY_CURRENT_USER\Software\Program\Preferences\VirtualCD","VirtualCDDriveList","REG_BINARY", "0x"&Hex(StringtoBinary($value))) So basically I'm needing to take the path and filename string, insert a null character in between every character, then convert it to hex value to write into the registry... The problem thus far has been in dealing with the existing white space. I'm having difficulty properly converting this to hex and spacing it with nulls while not losing the spacing that exists due to the long path name. Any help in conquering this problem would be most appreciated!
×
×
  • Create New...