The result of PEView and HxD is different. Is it possible? - reverse-engineering

The result of PEView and HxD is different. Is it possible?
I thought it should be same because it is raw data.
In PEveiw:
In HxD:

The correct value is `F8' according to all my tools on Windows 10, including PEView 0.9.9. Are you running both tools in the exact same environment? In a VM?
F8 is part of the e_lfanew field value in the DOS header, i.e. offset to the new executable header. In layman's terms, it points to the actual NT header (IMAGE_NT_HEADERS in PEView). lfa means long file address. It is a 32-bit (DWORD) relative virtual address (RVA) value. IMAGE_NT_HEADERS is located after the DOS stub and the Rich Signature header if one exists (it does in notepad.exe).
Of interest, using PEView and notepad.exe on a Windows 7 32-bit VN, the value displayed is D8 due to a different Rich Signature header.

Related

How can I create a trusted ACCDE Access file?

I would like to save an Access database as an ACCDE and also have it trusted. The reason being every time I open ACCDE I keep receiving the message:
"A potential security concern has been identified..."
I know that I can sign a ACCDC file with SelfCert.exe but thats not what I need.
I want the Access File to end with ACCDE and have the message:
"A potential security concern has been identified..." not show up.
You can create a registry key that will add the directory as a trusted location and will not show the warning anymore. What's nice about this method is that you can easily automate this to happen on the computers where you deploy your app. See method #2 or #3 in this blog: http://www.accessrepairnrecovery.com/blog/fix-microsoft-access-security-notice
And in case the blog ever gets removed, here is the important bits: [HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Access\Security\Trusted Locations\Location20] “Path”=”C:\Database\” “Description”=”My Database location”
Explanation about the key: – The number “14.0” is the version of MS Office. You can change the numbers that represent the version you are executing.
– The “Location20” is a unique name that you assign. 20 can be any number that is not previously used. Other programs include default MS Access wizards, already have used other numbers. But if you want to make more than one path as trusted location, then each location must end up with different number.
– The “C:\Database\” is the physical path that you want to set to be as Trusted Location. You can place any path that you choose here.
By copy and pasting the above coding into a text file and save it with a name such as RemoveSecurityWarning.reg, you can then run the file into your PC’s registry just by making double click on the file.

Set default Zoom Window font size in Access 2016 query designer?

Does anyone know if there's a way to set the default font size for the Access 2016 Query Zoom window?
I often use the Zoom window when editing lengthy/complex expressions. I can set the zoom window font size but it only "sticks" for the current session. Next time I start Access, it's back to Tahoma 8pt.
I have no issue with the "Query Design Font" (File → Options → Object Designers → Query Design Font) as it [properly] stays where I set it (Sergoe UI 11) between sessions, but the Zoom window seems to insist upon a smaller font than the query designer.
Maybe I'm missing something but I couldn't find anything applicable online, nor in/around registry keys:
HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Access
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\16.0\Access
It's a minor issue but years of frustration with it is starting to add up! Surely there's a setting somewhere so I don't have to change it every time I use Access... Any ideas? Thanks!
[I'm running Access 2016 (local install Version 1711 via Office 365 ProPlus subscription) on Windows 7 Home Premium SP1 64-bit.]
The Zoom box is part of (Office installation path)\ACCWIZ\UTILITY.ACCDA. You can open this file and see the form ZoomForm, but you can't edit it.
Note that the Zoom box is not restricted (or specific) to the query designer - you can use Shift+F2 wherever you can edit (or see) a value.
With help from https://access-programmers.co.uk/forums/showthread.php?t=238660 and https://bytes.com/topic/access/answers/739912-change-default-font-zoom-box :
Set a reference to UTILITY.ACCDA.
In your startup code (called from an AutoExec macro), call this function:
Public Function ZoomBoxSetParams()
' adapt to your preferences
utility.zoom_stFontName = "Consolas"
utility.zoom_iFontSize = 16
End Function
It is not necessary to overwrite the Shift+F2 action with an AutoKeys macro as proposed in the linked threads. You only need to set these variables, and the Zoom box will always use this font.
Note:
This is mainly useful for your development computer. If any of your users use a different version of Access, or the runtime version, the reference to UTILITY.ACCDA will break.
If you are in this situation, you will either have to remove the reference and code before distribution, or perhaps set the reference at runtime if UTILITY.ACCDA is available.
Edit:
An alternative Zoom box is here: http://www.accessmvp.com/TomVanStiphout/ZoomBox.htm
(I haven't tried it)

From hyperterminal to OS

Is there any way to take data from hyperterminal (whatever it has recevied from COM port) and give it to OS (windows).
For example, I want to write data which is coming from COM port into Microsoft Word file.
In other words, I've my own keyboard with RS323 interface and I want whatever I type is written in Microsoft Word file.
Yes, in C# you can use the SerialPort class. Here's a tutorial that goes over this: http://code.msdn.microsoft.com/windowsdesktop/SerialPort-brief-Example-ac0d5004
You will not need Hyperterminal for this as your software would do the comms instead using SerialPort.
From there I would use a StreamWriter (or something similar) to export it to a text file. You can try exporting to word but it will probably frustrate you.
Be aware that you set the relevant flowcontrol and baud rate settings that your device will require, otherwise you will experience connection issues.

How to get the current version number of a Trigger.io app

Is there a way to get the app config settings from inside my Trigger.io app without having to repeat the values in the parameters module? Specifically, I'm looking to grab the version number.
I've had success (today) with using forge.config.version
Example:
alert(forge.config.version)
This returned the value I had entered into the app's configuration.
It used to be available under forge.config in Javascript, but isn't anymore. For a while it wasn't available under this key (around v. 1.2). It has since reappeared.

How to find world region (or country) or language from the windows registry?

I'm working with a very old installer that can read Registry entries but has a difficulty (complex) time executing Windows APIs.
I'm trying to detect whether the PC it's being installed on is in Australia.
Any ideas?
This key:
HKEY_USERS.DEFAULT\Keyboard Layout\Preload
sets the default language for the login screen
The different country codes are listed here:
http://www.windowsitpro.com/Article/ArticleID/14867/14867.html
From my testing and the MSDN page below, this will work:
HKEY_CURRENT_USER\Control Panel\International\sCountry
="Australia"
This corresponds to setting in the Region Options ("Select an item to match it' preferences".
http://support.microsoft.com/kb/102978
This has the advantage of also being able to be read from a non-admin account.
To supplement: "HKEY_CURRENT_USER\Control Panel\International\sCountry" is only used for the notation format. You could also use. "HKEY_CURRENT_USER\Control Panel\International\Locale" and link it to a table.
The notation cross-table:
https://msdn.microsoft.com/en-us/library/ee825488(v=cs.20).aspx
https://www.science.co.il/language/Locale-codes.php
The current location is stored in "HKEY_CURRENT_USER\Control Panel\International\Geo\Nation"
The location cross-table:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd374073%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396