Advertisement
Guest User

Untitled

a guest
Sep 18th, 2014
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. <HTML>
  2. <HTA:APPLICATION ID="oMyApp"
  3. APPLICATIONNAME="Application Executer"
  4. CAPTION="no"
  5. WINDOWSTATE="maximize" />
  6. <head>
  7. <title>Test</title>
  8. </head>
  9.  
  10. <body>
  11. <CENTER>
  12. <BR><BR>
  13. <H1>The currently logged in user is <p><strong><div id="username1"></div></strong></p> <H1>
  14.  
  15. <BR><BR>
  16. <BR><BR>
  17. <CENTER>
  18.  
  19. <H1>If you are not <strong><div id="username2"></div></strong></p> <H1>
  20.  
  21. <Input type="Button" name="Button1"
  22. value="click here" onclick="javascript:clear_iPrint();"/>
  23.  
  24. <BR><BR>
  25. <BR><BR>
  26. <BR><BR>
  27.  
  28. <H1>If you are <strong><div id="username3"></div></strong></p> <H1>
  29.  
  30. <Input type="Button" name="Button2"
  31. value="click here" onclick="javascript:launch_Print_Release();"/>
  32.  
  33.  
  34. <script language="vbscript">
  35.  
  36. dim username1, username2, username3
  37. Set objShell = CreateObject("WScript.Shell")
  38.  
  39. reg_key = "HKEY_CURRENT_USER\Volatile Environment\NWUSERNAME"
  40. nw_username = objShell.RegRead(reg_key)
  41.  
  42. Document.getElementByID("username1").innerHtml = nw_username
  43. Document.getElementByID("username2").innerHtml = nw_username
  44. Document.getElementByID("username3").innerHtml = nw_username
  45. 'alert(nw_username)
  46.  
  47. </script>
  48.  
  49. <script type="text/javascript" language="javascript">
  50. function clear_iPrint() {
  51. WshShell = new ActiveXObject("WScript.Shell");
  52. WshShell.Run("C:/Users/nmancini1/clear_iPrint.bat", 1, false);
  53. }
  54. function launch_Print_Release() {
  55. WshShell = new ActiveXObject("WScript.Shell");
  56. WshShell.Run("C:/Users/nmancini1/launch_Print_Release.bat", 1, false);
  57. }
  58.  
  59.  
  60. </script>
  61.  
  62. </body>
  63.  
  64. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement