|
|
|||||||
Apologies if this is the wrong place to post this, I couldn't see an obvious place to raise a bug for a non-beta version. If you haven't called group functions before disabling WOW64 file redirection, all subsequent calls to those functions return no results. The simplest test I can find is: Code: ;EnumGroup(0) ;InGroup("TEST") $rc = SetOption("WOW64FileRedirection","OFF") $index = 0 Do $group = EnumGroup($index) ? $group $index = $index + 1 Until Len($group) = 0 Uncommenting either of the first two lines lets your group membership be printed, but with both commented out no groups will be printed. |
||||||||
|
|
|||||||
Interesting. I have not confirmed this, but I can imagine the reason this behavior has not been found before now is because you almost always put Wow64Redection line in the first few lines of a script. |
||||||||
|
|
|||||||
It is more the other way around; if you toggle it "off" and "on" where you definitely need the redirection to be disabled everything is fine, but if you set it to "off" at the start of the script (to ensure you are never redirected) it will break the group lookups. This isn't just in 4.67, I've seen the issue in previous releases but have only just tracked it down to the ordering of the function calls. |
||||||||
|
|
|||||||
I wasn't able to reproduce this on Win10 x64. What OS/bits are you on? |
||||||||
|
|
|||||||
Here is my slightly revised version of your script. Code: break on Dim $index, $RC, $Group ? "Redirection: " + SetOption("WOW64FileRedirection") $rc = SetOption("WOW64FileRedirection","OFF") ? "Redirection: " + SetOption("WOW64FileRedirection") $index=0 $Group=Enumgroup($index) While len($Group) $index=$index+1 $Group=Enumgroup($index) loop ? "Number of Groups: " + $index if ingroup(Enumgroup(0)) ? "In Group 0" else ? "Not in Group 0" endif With Redirection Turned off Quote: Redirection: ON Redirection: OFF Number of Groups: 14 In Group 0 With Redirection Turned On Quote: Redirection: ON Redirection: ON Number of Groups: 14 In Group 0 |
||||||||
|
|
|||||||
I've got some automation available so I tested on all Windows machines which happened to be running: Code: If InGroup("Everyone") ? "@PRODUCTTYPE @DOS Build @BUILD --> Working" Else ? "@PRODUCTTYPE @DOS Build @BUILD --> Not Working" EndIf Quote: Windows 7 Professional Edition 6.1 Build 7601 --> Working Windows 7 Professional Edition 6.1 Build 7601 --> Working Windows 7 Professional Edition 6.1 Build 7601 --> Working Windows 7 Professional Edition 6.1 Build 7601 --> Working Windows 7 Professional Edition 6.1 Build 7601 --> Working Windows 7 Professional Edition 6.1 Build 7601 --> Working Windows 7 Professional Edition 6.1 Build 7601 --> Working Windows 7 Professional Edition 6.1 Build 7601 --> Working Windows 7 Professional Edition 6.1 Build 7601 --> Working Windows 7 Professional Edition 6.1 Build 7601 --> Working Windows 7 Professional Edition 6.1 Build 7601 --> Working Windows 7 Professional Edition 6.1 Build 7601 --> Working Windows 7 Professional Edition 6.1 Build 7601 --> Working Windows Server 2012 R2 6.3 Build 9600 --> Working Windows Server 2012 R2 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2016 Datacenter Edition 10.0 Build 14393 --> Working Code: $rc = SetOption("WOW64FileRedirection","OFF") If InGroup("Everyone") ? "@PRODUCTTYPE @DOS Build @BUILD --> Working" Else ? "@PRODUCTTYPE @DOS Build @BUILD --> Not Working" EndIf Quote: Windows 7 Professional Edition 6.1 Build 7601 --> Not Working Windows 7 Professional Edition 6.1 Build 7601 --> Not Working Windows 7 Professional Edition 6.1 Build 7601 --> Not Working Windows 7 Professional Edition 6.1 Build 7601 --> Not Working Windows 7 Professional Edition 6.1 Build 7601 --> Not Working Windows 7 Professional Edition 6.1 Build 7601 --> Not Working Windows 7 Professional Edition 6.1 Build 7601 --> Not Working Windows 7 Professional Edition 6.1 Build 7601 --> Not Working Windows 7 Professional Edition 6.1 Build 7601 --> Not Working Windows 7 Professional Edition 6.1 Build 7601 --> Not Working Windows 7 Professional Edition 6.1 Build 7601 --> Not Working Windows 7 Professional Edition 6.1 Build 7601 --> Not Working Windows 7 Professional Edition 6.1 Build 7601 --> Not Working Windows Server 2012 R2 6.3 Build 9600 --> Working Windows Server 2012 R2 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2012 R2 Datacenter Edition 6.3 Build 9600 --> Working Windows Server 2016 Datacenter Edition 10.0 Build 14393 --> Working All of the above are 64 bit. I've also tried on my own Windows 10 (64 bit) machine and Server 2008R2, both of which stay working when the redirection is off. |
||||||||
|
|
|||||||
So Win 7 x64 is the one not working? I don't have a single instance of Win 7 anymore in my environment. Someone with a Win7 box, can you verify this. |
||||||||
|
|
|||||||
I've re-tested in a brand new VM (Windows 7 64 bit SP1, installed from a volume license ISO, no updates applied) and I still see the same problem. I've also checked a 32 bit one, and that doesn't have the problem, but equally there is nothing to redirect if the OS is 32 bit. |
||||||||
|
|
|||||||
I can confirm I see a similar result on Win 7 Enterprise / 64-bit. Code: If InGroup("Everyone") ? "@PRODUCTTYPE @DOS Build @BUILD --> Working" Else ? "@PRODUCTTYPE @DOS Build @BUILD --> Not Working" EndIf Whereas... Code: $rc = SetOption("WOW64FileRedirection","OFF") If InGroup("Everyone") ? "@PRODUCTTYPE @DOS Build @BUILD --> Working" Else ? "@PRODUCTTYPE @DOS Build @BUILD --> Not Working" EndIf |