Dear,

From your main script you can start another script.
Some ideas:
- we are reading the registry value to verify the necessary of update security file.
OK, no script will be started.
- no sleep 60 necessary when it is possible within ScriptLogic to end its
logon process by starting a script.
sleep 60 can also verify the completion of mappings/printers settings.
- we have remove unused code.

f.e.

main script

code:

;
; - your code -
;
IF (ReadValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SeCEdit\","TemplateUsed") <> "\\ServerName\netlogon\localpolicy.inf")
RUN '%comspec% /c \\server\netlogon\kix32.exe \\server\netlogon\update_security_file.kix '
ENDIF
EXIT


Your update_security_file.kix can be
code:

SLEEP 60 ; - choice a period which is enough -
DIM $index
CLS
$variable=ReadValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SeCEdit\","TemplateUsed")
IF $variable <> "\\ServerName\netlogon\localpolicy.inf"
? "Revised security file not present. New file copied."
$index=0
$returncode=SendKeys("^{ESC}")
$returncode=SendKeys("R")
$returncode=SendKeys("%systemroot%\system32\secpol.msc /s")
$returncode=SendKeys("{ENTER}")
SLEEP 2
$returncode=SendKeys("~A")
$returncode=SendKeys("I")
$returncode=SendKeys("\\ServerName\netlogon\localpolicy.inf")
$returncode=SendKeys("{ENTER}")
$returncode=SendKeys("~{F4}")
ENDIF
:skipfile
?"End of Script"


greetings.

btw: we doesn't see a COPY command in your latest script.

[ 17 February 2002: Message edited by: MCA ]

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA