Jump to content

Kısıtlı Program Nasıl Yapılır


DivaneTR
 Share

Recommended Posts

[b]Bir çalışma yapıyorum. Program üç bilgisayardan fazla bilgisayarda çalışmayacak. Bir ini dosyası ile yapmaya çalıştım. Program sadece 3 bilgisayarda çalışacak. Bir başka bilgisayara kopyalandığında çalışmayacak. Şöyle birşey yaptım ama olmadı.[/b]

[spoiler][codebox]
Oku = TextFile.ReadToString("AutoPlay\\Docs\\user.ini");
if Oku == "" then
Kullanici = Registry.GetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", "RegisteredOwner", true);
Sifrele = Crypto.BlowfishEncryptString(Kullanici, "trustno1withthispassword", 0);
INIFile.SetValue("AutoPlay\\Docs\\user.ini", "Kullanici", "1", Sifrele);
else
nCount = INIFile.GetValueNames("AutoPlay\\Docs\\user.ini", "kullanici");
nSay = Table.Count(nCount);
for i=1, 3 do
Check = INIFile.GetValue("AutoPlay\\Docs\\user.ini", "kullanici", i);
Kullanici = Registry.GetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", "RegisteredOwner", true);
end

if Check ~= Kullanici and nSay < 3 then
Sifrele = Crypto.BlowfishEncryptString(Kullanici, "trustno1withthispassword", 0);
INIFile.SetValue("AutoPlay\\Docs\\user.ini", "Kullanici", nSay+1, Sifrele);
else
Dialog.Message("Hata", "Program Kullanım Kotası Dolmuştur.\nProgram Şimdi Kapanacak !", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
os.exit()
end
end
[/codebox][/spoiler] Edited by Baba_
Link to comment
Share on other sites

Hallettim.

[center][spoiler]
[b]Global[/b]
[code]Dizin = _ProgramFilesFolder.."\\Common Files\\System\\data.ini"[/code]
[b]Page > On Preload[/b]
[codebox]
Kontrol = File.DoesExist(Dizin);
if Kontrol == false then
File.Copy("AutoPlay\\Docs\\Data.dvn", Dizin, true, true, false, true, nil);
Oku = TextFile.ReadToString(Dizin);
if Oku == "" then
sKullanici = Registry.GetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", "RegisteredOwner", true);
sKullanici = Crypto.BlowfishEncryptString(sKullanici, "DivaneSoft", 0);
INIFile.SetValue(Dizin, "kullanici", "1", sKullanici);
else
Kisi = INIFile.GetValueNames(Dizin, "kullanici");
nCount = Table.Count(Kisi);
if nCount < 3 then
sKullanici = Registry.GetValue(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", "RegisteredOwner", true);
sKullanici = Crypto.BlowfishEncryptString(sKullanici, "DivaneSoft", 0);
Check = String.Find(Oku, sKullanici, 1, false);
if Check == -1 then
INIFile.SetValue(Dizin, "kullanici", nCount+1, sKullanici);
elseif nCount > 2 then
Dialog.Message("Sistem", "Program Kısıtlaması !", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
os.exit()
end
end
end
end
[/codebox]
[b]Page > On Close[/b]
[code]File.Copy(Dizin, "AutoPlay\\Docs\\Data.dvn", true, true, false, true, nil);[/code]
[/spoiler][/center]

Link to comment
Share on other sites

Bence bu dediğiniz gerçek olsa idi bunu önce microsoft düşünmezmiydi :)
Ama burası tnctr burda herşey olur diyorsanız. Ona sözüm yok :)

Edited by &ULTİMATE&
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...