Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
577
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 2.36 KB | None | 0 0
  1. @echo off &setlocal
  2.  
  3. :: these variables will be expanded in the HTA code
  4. set /a sec = 5
  5. set /a width = 1024
  6. set /a height = 408
  7. set "fullname=C:\.......\placeyourpicturehere.jpg"
  8.  
  9. set "splash=%temp%\tmp.hta"
  10. :: all lines beginning with min. 6 spaces are redirected into the HTA file
  11. >"%splash%" (type "%~f0"|findstr /bc:"      ")
  12. mshta "%splash%"
  13. del "%splash%"
  14.  
  15. :: Start programs
  16. start ...
  17. start ...
  18. start ...
  19. start ...
  20. start ... insert programs here <---
  21.  
  22. goto :eof
  23. :: End Of Batch
  24.  
  25.       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "xhtml1-transitional.dtd">
  26.       <html xmlns="http://www.w3.org/1999/xhtml">
  27.         <head>
  28.           <title>SPLASH</title>
  29.  
  30.           <hta:application
  31.            id="oHTA"
  32.            applicationname="myApp"
  33.            border="thin"
  34.            borderstyle="normal"
  35.            caption="no"
  36.            contextmenu="yes"
  37.            icon=""
  38.            innerborder="no"
  39.            maximizebutton="no"
  40.            minimizebutton="no"
  41.            navigable="no"
  42.            scroll="no"
  43.            scrollflat="no"
  44.            selection="no"
  45.            showintaskbar="no"
  46.            singleinstance="yes"
  47.            sysmenu="no"
  48.            version="1.0"
  49.            windowstate="normal"
  50.           />
  51.  
  52.           <style type="text/css">
  53.             body      {margin:0px 0px 0px 0px;
  54.             background-color: red;}
  55.           </style>
  56.  
  57.           <script type="text/jscript">
  58.             /* <![CDATA[ */
  59.            
  60.             var oWSH=new ActiveXObject("WScript.Shell");
  61.             var i=parseInt(oWSH.ExpandEnvironmentStrings("%sec%"))*1000;
  62.             var w=parseInt(oWSH.ExpandEnvironmentStrings("%width%"));
  63.             var h=parseInt(oWSH.ExpandEnvironmentStrings("%height%"));
  64.             var s=oWSH.ExpandEnvironmentStrings("%fullname%");
  65.             window.resizeTo(w, h);
  66.             window.moveTo(screen.width/2-w/2, screen.height/2-h/2);
  67.  
  68.  
  69.             function start() {
  70.               image.src = s;
  71.               image.height = h;
  72.               image.width = w;
  73.               setTimeout('closing()', i);
  74.             }
  75.  
  76.             function closing() {
  77.               window.close();
  78.             }
  79.             /* ]]> */
  80.           </script>
  81.  
  82.         </head>
  83.         <body onload="start()">
  84.           <img id="image" src="" alt="" height="0" width="0" />
  85.         </body>
  86.       </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement