View previous topic :: View next topic |
What do you think about this utility? |
Good |
|
100% |
[ 2 ] |
Be More ...... |
|
0% |
[ 0 ] |
Bleah! |
|
0% |
[ 0 ] |
|
Total Votes : 2 |
|
Author |
Message |
Tdk161 Valued Contributor
Joined: 08 Feb 2005 Posts: 399 Location: ITALY
|
Posted: Tue Feb 15, 2005 6:24 am Post subject: Backup Licenses of external Dll |
|
|
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
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 |
|
|
Serge Professional Member
Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Tue Feb 15, 2005 8:12 am Post subject: |
|
|
sounds like a good idea
your code would be easier to read if you use the VDS tags instead of the CODE tag
serge _________________
|
|
Back to top |
|
|
Tdk161 Valued Contributor
Joined: 08 Feb 2005 Posts: 399 Location: ITALY
|
Posted: Tue Feb 15, 2005 8:28 am Post subject: |
|
|
Thank's for the tip about vds tag, next time I will Use it
Byez |
|
Back to top |
|
|
jules Professional Member
Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Tue Feb 15, 2005 9:38 am Post subject: |
|
|
I find the standard Regedit Export function works well enough for me. _________________ The Tech Pro
www.tech-pro.net |
|
Back to top |
|
|
Tdk161 Valued Contributor
Joined: 08 Feb 2005 Posts: 399 Location: ITALY
|
Posted: Tue Feb 15, 2005 11:15 am Post subject: |
|
|
Nice Jules
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 |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Tue Feb 15, 2005 4:21 pm Post subject: |
|
|
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 |
|
|
Tdk161 Valued Contributor
Joined: 08 Feb 2005 Posts: 399 Location: ITALY
|
Posted: Tue Feb 15, 2005 4:42 pm Post subject: |
|
|
Hi Skit
your idea it' true!!!!! I forgot this possibility
Many Thanks |
|
Back to top |
|
|
GeoTrail Valued Contributor
Joined: 18 Feb 2003 Posts: 572 Location: Bergen, Norway
|
Posted: Mon Feb 21, 2005 2:29 pm Post subject: |
|
|
Very nice idea Tdk161 _________________
|
|
Back to top |
|
|
|
|
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
|
|