forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Backup Licenses of external Dll

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 5 Source Code
View previous topic :: View next topic  

What do you think about this utility?
Good
100%
 100%  [ 2 ]
Be More ......
0%
 0%  [ 0 ]
Bleah!
0%
 0%  [ 0 ]
Total Votes : 2

Author Message
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Tue Feb 15, 2005 6:24 am    Post subject: Backup Licenses of external Dll Reply with quote

I needed to make backup of my licenses of external dll in VDS5, then I Writed this code
I hope that it will be usefull Laughing

Code:
#-----------------------------------------------------------------------------#
# Modulo: Backup Licenses VDS5                                                #
#                                                                             #
# Author: Andrea Sperotti                                                     #
#                                                                             #
# Copyright: 2005                                                             #
#                                                                             #
#-----------------------------------------------------------------------------#

Title Backup License Manager VDS5


  DIALOG CREATE,Backup/Restore Licenses VDS,-1,0,240,160,SAVEPOS,ONTOP,SMALLCAP
  DIALOG ADD,BUTTON,Backup,14,168,64,24,Backup
  DIALOG ADD,BUTTON,Restore,44,170,64,24,Restore
  DIALOG ADD,LIST,LIST1,24,10,142,129
  DIALOG ADD,BUTTON,Quit,127,174,64,24,Quit
  DIALOG ADD,TEXT,TEXT1,7,8,,,Licenses Founded
  List create,1
  List RegKeys,list1,HCU,Software\Commercial Research\VDS\5.0\License Manager
  List Seek,list1,0
  %%Key = @Next(List1)

  Repeat
    %%Code = @RegRead(HCU,Software\Commercial Research\VDS\5.0\License Manager\%%Key,KeyString)
    %%Dll = @RegRead(HCU,Software\Commercial Research\VDS\5.0\License Manager\%%Key,FullPath)
    List Add,1,%%Key*%%Code*%%Dll
    %%Key = @Next(List1)
  Until @Not(@Ok())
 
  DIALOG SHOW
:Loop
  Wait Event
  %J = @Event()
  Goto %J
 
:BackupButton
  %%File = @FileDlg("Backup File (*.lbk)|*.lbk",Save to,,SAVE)
  If %%File
    If @UnEqual(@Ext(%%File),lbk)
      %%File = @NamE(%%File).lbk
    End
    List SaveFile,1,%%File
  End
  List Clear,1
Goto Loop


:RestoreButton
List Clear,1
%%File = @FileDlg("Backup File (*.lbk|*.lbk",Load From,,OPEN)
If %%File
  List LoadFile,1,%%File
End
%%Riga = @Next(1)
Option FieldSep,*
Repeat
  Parse "%%Key;%%Code;%%Dll",%%Riga
  Registry Write,HCU,Software\Commercial Research\VDS\5.0\License Manager\%%Key,KeyString,%%Code,
  Registry Write,HCU,Software\Commercial Research\VDS\5.0\License Manager\%%Key,FullPath,%%Dll,
  %%Riga = @Next(1)
Until @Not(@Ok())
List Clear,1
Goto Loop

:Close
:QuitButton
  Exit

------------------------------------

Byez


Last edited by Tdk161 on Tue Feb 15, 2005 8:26 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Tue Feb 15, 2005 8:12 am    Post subject: Reply with quote

sounds like a good idea Smile

your code would be easier to read if you use the VDS tags instead of the CODE tag

serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Tue Feb 15, 2005 8:28 am    Post subject: Reply with quote

Thank's for the tip about vds tag, Embarassed next time I will Use it
Byez
Back to top
View user's profile Send private message Send e-mail
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Tue Feb 15, 2005 9:38 am    Post subject: Reply with quote

I find the standard Regedit Export function works well enough for me.
_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Tue Feb 15, 2005 11:15 am    Post subject: Reply with quote

Nice Jules Smile

I Start To Write a new License Manager for Vds5 with more futures than original:

-Backup/Restore Licenses
- Print Licenses Report


It's a Nice idea?

Buez
Back to top
View user's profile Send private message Send e-mail
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Tue Feb 15, 2005 4:21 pm    Post subject: Reply with quote

Hi Tdk161,

It's a nice program. I changed a few lines to make sure people can't run the program when there is no licenses information found in the registry.

Code:
  DIALOG CREATE,Backup/Restore Licenses VDS,-1,0,240,160,SAVEPOS,ONTOP,SMALLCAP
  DIALOG ADD,BUTTON,Backup,14,168,64,24,Backup
  DIALOG ADD,BUTTON,Restore,44,170,64,24,Restore
  DIALOG ADD,LIST,LIST1,24,10,142,129
  DIALOG ADD,BUTTON,Quit,127,174,64,24,Quit
  DIALOG ADD,TEXT,TEXT1,7,8,,,Licenses Founded
  List create,1
  List RegKeys,list1,HCU,Software\Commercial Research\VDS\5.0\License Manager
  if @not(@greater(@count(list1),0))
    warn "Sorry, no licenses to backup. Exiting now..."
    stop
  end
  List Seek,list1,0
  %%Key = @Next(List1)

# Continue the rest of the code here...

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Tdk161
Valued Contributor
Valued Contributor


Joined: 08 Feb 2005
Posts: 399
Location: ITALY

PostPosted: Tue Feb 15, 2005 4:42 pm    Post subject: Reply with quote

Hi Skit Very Happy

your idea it' true!!!!! I forgot this possibility Embarassed

Many Thanks
Back to top
View user's profile Send private message Send e-mail
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Mon Feb 21, 2005 2:29 pm    Post subject: Reply with quote

Very nice idea Tdk161 Smile
_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 5 Source Code All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group