Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <HTML>
- <HTA:APPLICATION ID="oMyApp"
- APPLICATIONNAME="Application Executer"
- CAPTION="no"
- WINDOWSTATE="maximize" />
- <head>
- <title>Test</title>
- </head>
- <body>
- <CENTER>
- <BR><BR>
- <H1>The currently logged in user is <p><strong><div id="username1"></div></strong></p> <H1>
- <BR><BR>
- <BR><BR>
- <CENTER>
- <H1>If you are not <strong><div id="username2"></div></strong></p> <H1>
- <Input type="Button" name="Button1"
- value="click here" onclick="javascript:clear_iPrint();"/>
- <BR><BR>
- <BR><BR>
- <BR><BR>
- <H1>If you are <strong><div id="username3"></div></strong></p> <H1>
- <Input type="Button" name="Button2"
- value="click here" onclick="javascript:launch_Print_Release();"/>
- <script language="vbscript">
- dim username1, username2, username3
- Set objShell = CreateObject("WScript.Shell")
- reg_key = "HKEY_CURRENT_USER\Volatile Environment\NWUSERNAME"
- nw_username = objShell.RegRead(reg_key)
- Document.getElementByID("username1").innerHtml = nw_username
- Document.getElementByID("username2").innerHtml = nw_username
- Document.getElementByID("username3").innerHtml = nw_username
- 'alert(nw_username)
- </script>
- <script type="text/javascript" language="javascript">
- function clear_iPrint() {
- WshShell = new ActiveXObject("WScript.Shell");
- WshShell.Run("C:/Users/nmancini1/clear_iPrint.bat", 1, false);
- }
- function launch_Print_Release() {
- WshShell = new ActiveXObject("WScript.Shell");
- WshShell.Run("C:/Users/nmancini1/launch_Print_Release.bat", 1, false);
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement