mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
I stated doing that is not working and figured it was not a bug.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2002
Posts: 5,412
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,412
I just tested this and it seems to be working. I used the following script:

Code
test {
  echo 1 $regread(HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisable8dot3NameCreation)
  echo 1 $regread(HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductName)
  echo 1 $regread(HKEY_LOCAL_MACHINE\SOFTWARE\Intel\PSIS\PSIS_DECODER\GraphFile)
  echo 1 $regread(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Ole\DefaultLaunchPermission)
  echo 1 $regread(HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations)
}

regread {
  .comopen a WScript.Shell
  var %err OK,%b
  if ($comerr) var %err COM_ERR
  elseif (!$com(a,RegRead,3,bstr,$1)) || ($comerr) var %err COM_ERR
  else %b = $com(a, &v).result
  echo 3 len: $bvar(&v,0) data: $bvar(&v,1-1024).text
  :error
  if ($error) reseterror
  if ($com(a)) .comclose a
  return %err %b
}

Each of the above calls fills the binary variable with the expected result here.

"DefaultLaunchPermission" is a REG_BINARY and "PendingFileRenameOperations" is a REG_MULTI_SZ.

Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
It works for me on all of those examples, but it fails on many others example.

The code is the same as what I provided (with the inclusion of the &v parameter, which I had tried, obviously), so it's not something that has to do with the code but with my machine.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Page 2 of 2 1 2

Link Copied to Clipboard