Winstep

Software Technologies


 Winstep Forums


Print view
Board index : Winstep Forums : General Discussion  [ 9 posts ]
Author Message
 Post subject: [Bug] Nexus, Regedit and Scripts (vbs, cmd...)
PostPosted: Thu Oct 20, 2016 4:45 pm 
Offline

Joined: Sun Sep 29, 2013 7:54 pm
Posts: 24
I found a bug that occurs in some keys in the registry to start Regedit through a script (vbs, cmd) or the command prompt.




Key: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers

Content used in the video: http://www.mediafire.com/file/dtvipy3f3 ... ontent.zip


Note: If I try to write this key via a script will display the same error.

Note 2: This bug also occurs in scripts started by other scripts.


Back to top
 Profile  
 
 Post subject: Re: [Bug] Nexus, Regedit and Scripts (vbs, cmd...)
PostPosted: Thu Oct 20, 2016 9:35 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 11930
Humberto, thanks for the video even though it deserved to have some voice comments to go along with it in order for me to understand better what was going on.

Anyway, from what I could gather, you found a bug... in Windows 10!

Seems it's showing you different views of the same Registry key based on where you are coming from. Nice. Not.

My guess is that these depends on whether Windows is using the 32-bit or the 64-bit version of Regedit to read the Registry.

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: [Bug] Nexus, Regedit and Scripts (vbs, cmd...)
PostPosted: Thu Oct 20, 2016 11:02 pm 
Offline

Joined: Sun Sep 29, 2013 7:54 pm
Posts: 24
It seems that really is a problem in Windows x64. I tested it on Windows 10 x86 and Windows 7 x86 and running smoothly. Windows 7 x64 had the same problem.


Back to top
 Profile  
 
 Post subject: Re: [Bug] Nexus, Regedit and Scripts (vbs, cmd...)
PostPosted: Thu Oct 20, 2016 11:13 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 11930
Humberto wrote:
It seems that really is a problem in Windows x64. I tested it on Windows 10 x86 and Windows 7 x86 and running smoothly. Windows 7 x64 had the same problem.


The bug is probably in the 32 vs 64 bit versions of the Registry Editor, I doubt it has anything to do with the Winstep application per se.

Try launching the 32 bit version of RegEdit in C:\Windows\SysWoW64\ from an Explorer folder or WIN+R (i.e.; do not use the dock). Make sure it says regedit.exe*32 in the processes tab of the Windows Task Manager. Look at the contents of that registry key.

Now launch the 64 bit version of RegEdit in C:\Windows\ and compare the two views of the same registry key.

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: [Bug] Nexus, Regedit and Scripts (vbs, cmd...)
PostPosted: Fri Oct 21, 2016 1:40 am 
Offline

Joined: Sun Sep 29, 2013 7:54 pm
Posts: 24
The problem happens also to open “C:\Windows\SysWoW64\Regedit.exe” as you mentioned, but this redirection occurs even if I point the
"C:\Windows\Regedit.exe" or change the path to “C:\Windows” and run regedit.


Back to top
 Profile  
 
 Post subject: Re: [Bug] Nexus, Regedit and Scripts (vbs, cmd...)
PostPosted: Fri Oct 21, 2016 1:53 am 
Offline
Site Admin
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 11930
Humberto wrote:
but this redirection occurs even if I point the
"C:\Windows\Regedit.exe" or change the path to “C:\Windows” and run regedit.


Not sure what you mean by this last part.

Do you confirm that the two different views of the Windows Registry are presented when you run the 32 bit and 64 bit versions of RegEdit, even when you are not launching them from the dock?

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: [Bug] Nexus, Regedit and Scripts (vbs, cmd...)
PostPosted: Fri Oct 21, 2016 3:35 am 
Offline

Joined: Sun Sep 29, 2013 7:54 pm
Posts: 24
Quote:
Do you confirm that the two different views of the Windows Registry are presented when you run the 32 bit and 64 bit versions of RegEdit, even when you are not launching them from the dock?


Yes.

Quote:
Not sure what you mean by this last part.



When start Regedit.exe the path "C:\Windows\Regedit.exe"¹ or change the path² to “C:\Windows” and run regedit. The Nexus still run regedit “C:\Windows\SysWoW64\Regedit.exe” (32 Bits)


¹ Start "" "C:\Windows\Regedit.exe" (Cmd)
² CD /D "C:\Windows" & Start Regedit.exe (Cmd)


Back to top
 Profile  
 
 Post subject: Re: [Bug] Nexus, Regedit and Scripts (vbs, cmd...)
PostPosted: Fri Oct 21, 2016 4:13 am 
Offline
Site Admin
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 11930
Humberto wrote:
Yes.


Ok, so you realized already this is really two very different issues:

The first is the 32 bit version of RegEdit not showing the same thing as the 64 bit version of Regedit.

That has nothing to do with the Winstep application.

Humberto wrote:
¹ Start "" "C:\Windows\Regedit.exe" (Cmd)
² CD /D "C:\Windows" & Start Regedit.exe (Cmd)


If I start Regit directly from the dock or Shelf with the "C:\Windows\Regedit.exe" path, the Winstep application will correctly launch the 64 bit version of RegEdit.

The problem is that's not what you are doing. You are NOT launching Regedit directly, instead you are doing it through the CMD (command prompt). Now, cmd.exe also has a 32 bit (SysWOW64) and a 64 bit (System32) version.

Nexus is a 32 bit application, and, as such, subject to the automatic file system re-direction enforced by Windows for 32 bit applications on 64 bit systems. Many times it has to use 'tricks' (such as temporarily disabling re-direction) to be able to properly 'see' and launch 64 bit applications.

However, if you don't specify a 64 bit application directly, it will by default run the 32 bit version of an application even if a 64 bit version also exists (i.e.; it will comply with the file system re-direction).

That's what I think is happening there: you're running a script/batch file and not CMD directly, so when the script is launched it will in turn launch the 32 bit version of CMD, not the 64 bit version.

Try invoking CMD.exe directly instead of the batch file, using the script's filename as an argument (e.g.; C:\Windows\System32\CMD.exe in the Filename line with C:\MyBatch.bat as the Argument.)

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: [Bug] Nexus, Regedit and Scripts (vbs, cmd...)
PostPosted: Fri Oct 21, 2016 5:30 am 
Offline

Joined: Sun Sep 29, 2013 7:54 pm
Posts: 24
I tested here and worked on almost everything, but not in batch when you run as administrator (manually). Fortunately scripts batch can adapt to vbscript.

Thank you for your support.


Back to top
 Profile  
 
Post new topic Reply to topic Board index : Winstep Forums : General Discussion  [ 9 posts ]
Display posts from previous:  Sort by  

Who is online

Users browsing this forum: Google [Bot] and 71 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron