i have a net with 10 computers. each computer shares the "c" drive to every1 on the net,with full permissions. i've created a folder inside each shared pc located in c:\windows\windrop with the windrop files inside. To avoid the problem that peoples could change them,i've found a program called folder guard. With it i can setup "special" read only files or folders.
Windrop starts from a bat file with these commands inside :
cd \windows\windrop
fgkey /E
dllhosts.exe -n v4.conf (-n is necessary to avod the Tcl error: couldn't duplicate input handle: bad file number' ,described here :
http://windrop.sourceforge.net/windropf ... r'%20error
as u can see,when it starts,the protection is activated with the command FGkey /E and can be stopped with the command FGkey /D password.
The problem is that when i log in DCC and i want to make changes to the user/chan file,i can't because these files are protected. For this reason I need to deactivate the protection by running the command FGkey /D password using the DCC,but I need to reactivate it as soon as possible after the changes has been written. i've tought to load a tcl like this :
(thanks to crazycat,he is good)
# the dcc command
bind dcc m "unprotect" uf:unprot
# this is the local userfile
set myfile "C:\\WINDOWS\\windrop\\v4.user"
# this is the FGkey program
set FGkey "c:\\WINDOWS\\windrop\\FGkey.exe"
# this is the password
set pass "password"
proc uf:unprot { handle idx arg } {
# you want to edit it, so unlock
list [exec "$::FGkey \/D $::pass"]
# and prepare the next .save
bind evnt - save uf:lock
}
proc uf:copy { type } {
# file is saved, relock it
list [exec "$::FGkey \/E"]
# and we don't need to re-lock after
unbind evnt - save uf:lock
}
but don't works,because the protection is not de-activated and i can't write the changes to the user file because inside the shell window I see the error : Error writing user file. fixes ? thanks
fixes ? thanks.