cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

batch file to collect host id for flexnet (6.0 and above) licensing

naglists
1-Newbie

batch file to collect host id for flexnet (6.0 and above) licensing

WITHOUT annoying your users too much. Supports collecting the information
and generating the license ahead of any Arbortext Administrator conducted
install so you're not waiting around the user's cubicle while the PTC
licensing application is chugging away on preparing your license file.

FYI: I modified the file contents here in my e-mail to obscure information
potentially considered proprietary. I may have introduced typos or errors
of logic. Read carefully and test well in a non-production environment blah
blah blah

=======
@echo off

rem Make a directory on the user's hard drive to store cpu_id.exe which
will not run from a UNC.
mkdir "c:\Arbortext\cpuid"

rem Copy the contents of a server directory which contains cpu_id.exe to
the directory you just created.
xcopy \\servername\sharename\cpuid "c:\Arbortext\cpuid" /s /y /i

rem Grab the MAC address reported by cpu_id.exe and start an Outlook e-mail
request with that information
rem in the subject line to two Arbortext admins at yourcompany.
rem Outlook path is based on Outlook 2003.
rem The following line (starting "for /f ..." and ending "...%20%%x")
should be all on one line with no breaks:
for /f "tokens=4" %%x in ('c:\Arbortext\cpuid\cpu_id.exe') do "C:\Program
Files\Microsoft Office\OFFICE11\outlook.exe" /c ipm.note /m
admin1@yourcompany.com%%
3Badmin2@yourcompany.com?subject=please%%20issue%%20me%%20a%%20new%%20Arbortext%%20Editor%%20license.%%20My%%20host_id%%20is%%3A%%20%%x

rem You are supposed to be able to add &body=bodytextofanemailgoeshere to
the end of the command above.
rem I could not, however, ever get it to work. (If I put
body=bodytextofanemailgoeshere before subject=subjecttext
rem and inserted the & in front of subject since it is now a second
operand, I only got body text ... no subject text.)

rem Probably remove pause before deploying.
pause

======

Enjoy.

--
Paul Nagai
6 REPLIES 6

I just wanted to note that if the user has multiple NICs installed, you
should be careful to choose the correct one.

For example, most of our users are remote, and use their laptops via WiFi
at home. I made the mistake of setting up one while plugged in to
ethernet, which caused it to fail when the user returned to WiFi.

Also, in Windows7, the default setting is to disable the NIC when not in
use. We needed to disable this in power settings to ensure the mac
address was available for licensing.


Hi Keith,

Thanks for writing about this. We are at the very beginning of our
deployment and I expect EXPECT we will stumble on this issue as well. I
work remotely most of the time and did notice that the MAC address
cpu_id.exe selected was the virtual one associated with my VPN connection.

How have you dealt with users who work an even split onsite and off? While
most of the authors I support are stable with respect to their location,
one team basically won't stop working, so they are often onsite and off in
the same day.

From what I've seen so far, it doesn't matter which MAC address is used,
only that the device present and active at the time of Arbortext launch.
Using the WiFi MAC for laptops and ethernet for desktops usually does the
trick, and we've had no problems with the use of our VPN tunnel. (I've
also accidentally assigned licenses to the bluetooth adapter, so picking
the right one can be tricky at times)

Disabling the adapter sleep does not seem to be foolproof however. For
most of our users that work heavily in Arbortext, this approach seems
sufficient. For users that work sporadically, or try to launch Arbortext
immediately after a hibernate/sleep resume, there have been some reports of
licencing failure. This usually corrects itself once the user tries to go
to a website or the like, but it's still an annoyance.



Do you use the cpu_id.exe PTC provides? It sounds like you just choose the
MAC address from "ipconfig /all" output or similar. To clarify, are you
saying that the license check Editor performs queries to see whether any of
the active MAC addresses match the one embedded in the license?

I had thought it looked at a specific one using some magic logic replicated
by cpu_id.exe. Sounds like that's wrong.

That's correct. I actually didn't know there was a separate app provided
by PTC (assumed it was internal and part of the application launch).

That said, this is the response from Jason Giroux when I initially opened a
case with PTC:

"Please note that the PTC FlexNet licenses can only be configured off of
the Physical Address of a single network card which must remain enabled in
order for a PTC application to use the license. I suspect that in your case
the Windows OS is disabling the card used for the license file when it is
not connected. There is a way to force Windows not to do this but you would
want to use the card that is most often connected to minimize and manual
disabling of that card."

The last sentence pretty much implies any address is fine.

Thanks a ton. That's going to save me some headaches and cycles.

Top Tags