Guest User

Untitled

a guest
Jan 16th, 2017
799
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. @echo off
  2. setlocal
  3. :MENU1
  4. echo Select an option:
  5. for /F "delims=" %%a in ('mshta.exe "%~F0"') do set "HTAreply=%%a"
  6. echo End of HTA window, reply: "%HTAreply%"
  7. IF %HTAreply%==1 GOTO :EST
  8. IF %HTAreply%==2 GOTO :CST
  9. IF %HTAreply%==3 GOTO :MST
  10. IF %HTAreply%==4 GOTO :PST
  11.  
  12. :EST
  13. tzutil /s "Eastern Standard Time"
  14. GOTO :Done
  15. :CST
  16. tzutil /s "Central Standard Time"
  17. GOTO :Done
  18. :MST
  19. tzutil /s "Mountain Standard Time"
  20. GOTO :Done
  21. :PST
  22. tzutil /s "Pacific Standard Time"
  23. GOTO :Done
  24.  
  25.  
  26. -->
  27.  
  28.  
  29. <HTML>
  30. <HEAD>
  31. <HTA:APPLICATION SCROLL="no" SYSMENU="no" >
  32.  
  33. <TITLE>Select Time Zone</TITLE>
  34. <SCRIPT language="JavaScript">
  35. window.resizeTo(200,160);
  36.  
  37.  
  38. function closeHTA(reply){
  39. var fso = new ActiveXObject("Scripting.FileSystemObject");
  40. fso.GetStandardStream(1).WriteLine(reply);
  41. window.close();
  42. }
  43.  
  44. </SCRIPT>
  45. </HEAD>
  46. <BODY>
  47. <button onclick="closeHTA(1);">EST</button>
  48. <button onclick="closeHTA(2);">CST</button>
  49. <button onclick="closeHTA(3);">MST</button>
  50. <button onclick="closeHTA(4);">PST</button>
  51. </BODY>
  52. </HTML>
Advertisement
Add Comment
Please, Sign In to add comment