What did I do???
Well...
code:
;;;;;TST.KIX;;;;;
Break on
SetL "SU_COMMANDLINE=.\wkix32.exe d:\kix\tst\tst_2.kix"
SetM "SU_Server=\\@wksta"
SetM "SU_share=\admin$$"
SetM "SU_drive=O:"
Shell @scriptdir+"\tst_SU"
SetM "SU_Server="
SetM "SU_share="
SetM "SU_drive="
Exit 0
code:
;;;;;TST_2.KIX;;;;;
Break on
Use %SU_drive% %SU_server%+%SU_share%
If @error
$rc=MessageBox("Error (@error) while connecting %SU_drive% to %SU_server%"+"%SU_share%.","")
Else
$rc=MessageBox("Connected %SU_drive% to %SU_server%"+"%SU_share% succesfully.","")
EndIf
Use %SU_drive% /d
If @error
$rc=MessageBox("Error (@error) while disconnecting %SU_drive% from %SU_server%"+"%SU_share%.","")
Else
$rc=MessageBox("Disconnected %SU_drive% from %SU_server%"+"%SU_share% succesfully.","")
EndIf
Exit 0
code:
;;;;;TST_SU.KIX;;;;;
SetL "SU_PASSWORD="+$SU_password
Shell '"@scriptdir\su.exe" admin "%SU_COMMANDLINE%"'
Exit 0
I made an exe of tst_su.kix with the command:
code:
wkixcrypt -f "D:\Kix\tst\WKIX32.EXE" -f "D:\Kix\tst\SU.EXE" -m "" -e
""""%%KIXCRYPTDIR%%\wkix32.exe""" """%%KIXCRYPTFILE%%""" $SU_PASSWORD=********"
"D:\Kix\tst\tst_su.kix"
I think this works and is secure...
[ 26. February 2003, 23:54: Message edited by: MightyR1 ]