Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.4 KiB

  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <package>
  3. <comment>
  4. The script echoes its command line arguments to the file and sleeps for 10 secs.
  5. It is made as simple as possible to prevent execution errors.
  6. The caller of the script needs (and may) use it to verify the
  7. absence of other errors.
  8. </comment>
  9. <job>
  10. <script language="VBScript">
  11. <![CDATA[
  12. Option Explicit
  13. Dim oaArgs, oArg, opShell, opFilesys, sFolder, opTextFile
  14. Set oaArgs = WScript.Arguments
  15. Set opShell = CreateObject("WScript.Shell")
  16. Set opFilesys = CreateObject("Scripting.FileSystemObject")
  17. sFolder = opShell.ExpandEnvironmentStrings("%systemdrive%")
  18. Set opTextFile = opFilesys.CreateTextFile( sFolder & "\" & "test.txt", True)
  19. opTextFile.WriteLine _
  20. WScript.Name & _
  21. VBNEWLINE & _
  22. WScript.Application.FullName & _
  23. " " & _
  24. WScript.ScriptFullName
  25. opTextFile.WriteLine _
  26. "Arguments:"
  27. For Each oArg in Wscript.arguments
  28. opTextFile.WriteLine _
  29. oArg
  30. Next
  31. opTextFile.Close
  32. Set oaArgs = Nothing
  33. Set opTextFile = Nothing
  34. Set opShell = Nothing
  35. Set opFilesys = Nothing
  36. WSCript.Sleep 10000
  37. WSCript.quit(0)
  38. ]]>
  39. </script>
  40. </job>
  41. </package>