If you type systeminfo at the command prompt, there is a listing for Product ID. Can someone explain what this is exactly, and would it make a good seed for a registration code algorithm?
i believe it's representative (or is) your windows product key. Either way, all you really want is a GUID.
From http://technet.microsoft.com/en-us/library/bb878062.aspx
You can find the product ID of your
installation by right clicking on My
Computer and choose Properties, then
viewing the General tab. You can also
find the product key in the registry
at:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\ CurrentVersion\ProductId.
It's a good start. But (IMHO) you can use directly a GUID.
Read more here: http://en.wikipedia.org/wiki/Device_fingerprint (read about Active fingerprinting)
Related
As part of our installation procedure we have to install Adobe Acrobat XI. According to Adobe:
The basic formula for constructing and decoding the GUID is as follows:
Acrobat: Example: AC76BA86-1033-F400-7760-100000000002
[product family]-[language code]-[additional languages]-[product type]-
[license type][major version][major minor version]
Since I know the key is located in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall and I know the key starts with {AC76BA86- I would like to simply search for the key(s) that begin with that sequence so I can inspect it to determine if we need to install Acrobat.
Is there a way to do a partial registry key search in InstallShield's install script?
Adobe is bastardizing their product codes and I really DON'T suggest playing along with that game.
However, if you read section 2.11.3 you'll see that all readers share the common UpgradeCode of A6EADE66-0000-0000-484E-7E8A45000000.
What this allows you to do is use the Upgrade Table / FindRelatedProducts to search for ProductCodes based on this UpgradeCode. Use the "Detect Only" setting and the ProductCode found will be assigned to the Property of your choosing.
No custom actions, no bastardized ProductCode GUIDS. Simple, easy... "It Just Works".
Looks like the best way to do this was to use RegDBQueryKey(<registry path>, REGDB_KEYS, <returnList>) to get a list of subkeys and then inspect each key in the list to see if it started with the partial value I was looking for.
See the screenshot here:
I'd like the user to just type a city or country name and the autocompleter will show suggested items.
How should I start for creating it?
Are there any API(s) or web services for me to call?
Where can I find the database of all cities/countries in the world?
I think this would be the best database for your situation, check it out:
http://www.geodatasource.com/cities-free.html
You first need a autocomplete plugin.
I recommend to use the jQuery-Ui Auto Complete Plugin.
The database could as example be this, but eventually try to search a bit for yourself.
There was already a question on stackoverflow about a database for cities of the world.
A simple text file with all cities may also be this.
There are very much of those libraries, but you have to chose the right one for you.
My solution may not be the best, but it's a starting point:
Google a list with all countries (ISO-Standard), paste it into a txt-file. Then you can simply read that file with PHP an create a select menu with the contents of the file.
It does not incorporate the cities, but maybe it helps you in some way.
I'm hoping that someone here has worked with UPC/Coupon barcodes before. Part of every UPC/Coupon barcode is a manufacturer code. I need to database every manufacturer code. Does anyone have any idea where to find a database of these manufacturer codes?
A quick Google search for "upc database" turned up several different ones. Sadly, you are probably not going to find a definitive database. Some stores use their own UPCs internally, and then you also have the abbreviated UPCs as well (look at a can of Pepsi to see what I mean).
See https://opendata.stackexchange.com/questions/562/does-there-exist-a-global-database-of-all-products-with-ean-13-barcodes which has a very similar question. Among the options listed in that thread The Product Open Data project looks to be the most promising. There you can download their entire catalogue database, and that database has a column of all the Global Company Prefixes (GCPs) they have captured.
Here are a few resources I found:
http://www.upcdatabase.com/
http://www.ean-search.org/
If you are in the U.S. (I am assuming), you can use this site to search by GTIN, which (in the U.S.) is the same as a 12-digit UPC code (from a barcode scan) with the digits "00" prefixing the UPC, making it a total of 14 digits and GTIN-14 compliant. To see an example, use "00028000133177" for a test search.
That search will give you the GLN for the manufacturer.
I've found the wikipedia's explaination of UPCs to also be very helpful.
I am developing a ERP software inhouse and one of the requests is to have the the username of the person creating any document to appear on the window title when that document is opened.
It will be something like [USR] - Transport Order 123456
Are there any usability rules that I am not adhering to by doing this? It just looks a bit unprofessional to have [] in the window title.
Any ideas?
There's nothing wrong with that at all. As a matter of fact, many of the biggest ERP applications do similar things.
In my opinion, though, the first part of the title should either be the name of the application or the name of the window. Anything else should go after that. It just makes it easier to read.
Something like this, maybe:
ApplicationName - Transport Order 123456 - UserName
Both the Windows UX Guidelines and Apple HIG have rules for naming windows. However, the specific rules are oriented towards document-type applications rather than database-type applications like ERP. Nonetheless the general principles apply.
The primary purpose of the window title is to make it easy for users to distinguish their windows. For this reason both Windows UX Guidelines and Apple HIG recommend windows be titled by their content, since that is usually what users will be looking for to choose a window to click on. Other potentially useful information, like the program name, may follow the content identity. The Windows UX Guidelines, for example recommends a “document name – program name” format (p316). You want the most distinguishing information first in the title so it's easiest to see, especially when looking at the task bar for which the name is often truncated. Also, the icon represents the program identity, so the program name is a little redundant anyway.
Multi-window ERP apps likewise should distinguish their windows by their content. Thus generally, the title should start with the window name, identifying the class of data shown in the window, followed by any filtering or querying criteria of the data. This order assumes users are more likely to have open two different windows than two instances of the same window with different filtering criteria. The title may end with the program or application name, if you think it’s necessary. So an example title would be something like:
Shipments (Ship Date: 2008-01-01 to 2010-01-01) ERP-O-Rama
It may be helpful to include the user who created or "owns" the data if that is different than the user currently looking at the data, but that still doesn't sound like something that distinguishes windows -are users going to be looking two different versions of the same content created by two different users? It seems at best to be secondary information to put at the end of the title if there at all. Why do users need to know this? Perhaps it should be a field in the window or a property in a Properties dialog.
You certainly don't need the current user's name in the title, unless users can be simultaneously logged in under different identities (e.g., they’re Jakob Nielsen for one window but Jared Spool for another). Users generally know who they are, so it seems like unnecessary clutter to me. If users may be logged in as different users or roles for different sessions (which is generally not a good idea) then you may want to represent that in the status bar, but not the title bar.
Brackets vs. parentheses vs. dashes seem like a matter of taste to me. Windows generally prefers em-dashes. My only advice is to use them only when necessary to delimit substrings. "[USR]" doesn't seem appropriate unless there may be spaces in the username.
Do your users care if you break a "usability rule", so long as what you do makes the program more usable? That is, if putting the username in the title enhances usability for your specific users, strict adherence to some standard comes secondary.
Put the needs of your user first. If putting the user's name in the title bar enhances usability, by all means do it.
I recommend something like
123456 - Joe User
The square brackets aren't necessary, and neither is the phrase "Transport Order" unless you need them for disambiguation.
My dream is to query the network card setting on WIN using python. What I need is to query if the NIC is set to full duplex and if it is set to 1000Mb full. WMI class named Win32_NetworkAdapterConfiguration doesn't provide these info.Alternatively a cmd command line sulution can be insteresting as well (via calling from python).
Thnx
As #ironfroggy said, this is not specific to Python, but a general Windows question.
When we wanted to programmatically find the speed and duplex settings on network cards, it was very difficult. In the end we resorted to wandering through the registry, which has a different structure depending on the vendor of your NIC.
It goes something like this; apologies for any errors:
Find HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network and look for GUIDs that have the data "Network Adapters". Call this <GUID1>.
Underneath the <GUID1> key is another GUID for each NIC. Call one of them <GUID2>.
Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\<GUID1>.
Iterate through its keys (they look like 0000, 0001, 0002, etc.) until you find one that has the value NetCfgInstanceId equal to <GUID2>.
Underneath here, look for a subkey dependent on NIC vendor. Some we have defined are:
Ndi\Params
Ndi\savedParams
BRCMndi\params
Under there, iterate through the keys until you find one with a value called ParamDesc whose data contains the words "speed" and "duplex". Remember the key name and called it <SpeedDuplexParamName>.
Underneath <SpeedDuplexParamName> there is an enum key, which matches numbers to descriptions like "Auto-detect" and "100 Mb Full".
Go back up a few levels to where you found NetCfgInstanceId. Near there you can see the current value as an enumeration. For one example here the value name was RequestedMediaType and the value was 6.
Look up the enumeration value to find the speed and duplex setting.
I see #DrFalk3n has linked to a Microsoft article that might say the same, but I'll leave this here in case it is helpful.
This really isn't a python question. Anything you can do with the win32api, You can do through Python, so the question here is just about the windows API and it doesn't make any difference that you happen to be invoking them from Python. Asking without the Python tag might get better response, actually, because people will look who know how to do it in another language, which would be using the same API.
Yes! This really isn't a python question. Anyway take a look at:
List Network Adapter Configuration Properties
and brows down into the python#microsoft scripts repository maybe helpfull for your problem.
You can also find usefull in python:
>>> import os
>>> f= os.popen('<type your dos command>')
>>> s = f.read()
>>> print s