Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / September 2005

Tip: Looking for answers? Try searching our database.

Generate hardware code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Etienne - 23 Sep 2005 16:04 GMT
Hi, in order to protect my software using web activation, I generate a
computer hardware code. I'm using the motherboard serial and CPU serial,
with ManagementObjectSearcher class. This relies on WMI. On Win9x, since it
doesn't support WMI, I simply get the windows volume serial, although it's
not as good.

But now the problem is. The user needs to be admin in order to get those
codes! If the software runs under a guess account, it crashes. Any good
suggestion?

Thanks,
Etienne Charland
Lenard Gunda - 23 Sep 2005 20:30 GMT
Hi,

Do you need to check those things every time, or just once?

Because you say activation, it might be that you only want it once. In that
case, you can prompt the user for an admin password the first time the
application is run. You can then use PInvoke and LogonUser Win32 API
function to generate a user token. Then use WindowsIdentity.Impersonate to
impersonate the administrator user until you activate. Remember to restore
to normal user level after you are done.

(If you need to check once, this could also be checked during setup, which
probably requires elevated privileges anyway)

If you require these things every time, you somehow need to make sure your
program gets elevated privileges to read those things. Always asking for an
admin password could be annoying, and might not be available always either.

Regards
-Lenard

> Hi, in order to protect my software using web activation, I generate a
> computer hardware code. I'm using the motherboard serial and CPU serial,
[quoted text clipped - 8 lines]
> Thanks,
> Etienne Charland

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.