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.

31 lines
1.2 KiB

  1. ' Copy the Terminal Services ActiveX control since we don't build it, but need it for private builds
  2. strReleasePath = "\\dsys-rel-fre\release\usa"
  3. strCabFile = "msrdp.cab"
  4. Set fileSystem = CreateObject ("Scripting.FileSystemObject")
  5. Set releaseFolder = fileSystem.GetFolder(strReleasePath)
  6. 'Get the directory for the latest build
  7. 'This gets the latest build directory assuming the folders are listed alphabetically
  8. Set subFolders = releaseFolder.SubFolders
  9. For Each subFolder in subFolders
  10. name = subFolder.Name
  11. If InStr(1, name, "x86fre") Then
  12. strBuild = name
  13. End If
  14. Next
  15. strReleasePath = strReleasePath & "\" & strBuild & "\"
  16. Set WshShell = CreateObject("WScript.Shell")
  17. strPostBuildDir = WshShell.ExpandEnvironmentStrings("%_NTPOSTBLD%")
  18. 'For some reason, I get an Access Denied message if I try to copy the file programmatically,
  19. 'so I create a batch file to copy the cab
  20. If fileSystem.FileExists(strReleasePath & strCabFile) Then
  21. Set batchFile = fileSystem.CreateTextFile("CopyMsrdp.bat", True)
  22. batchFile.WriteLine("copy " & strReleasePath & strCabFile & " " & strPostBuildDir)
  23. batchFile.Close
  24. Else
  25. wscript.echo "File does NOT Exist: " & strReleasePath & strCabFile
  26. End If