People has suggested to me that maybe I should create a USB drive splash screen that works similar to my lost USB drive program. So, I came up with this little number.
Application First, Code Later
One of the bits of feedback that I have been receiving is that, unlike me, most people don’t care about what is happening behind the scenes on their computer. They simple want to download the program, learn how to use it, and then get out of there. So, I’m going to be putting the download for the program and how to use it in my articles first.
To use this program, simply download AutoSplash.zip. This has all of the files that you need to run immediately on your USB drive.
Extract these files from AutoSplash.zip and copy them to the root of your USB drive:
- autorun.inf
- autosplash.exe
- autosplash.ini
- SplashImage.jpg
AutoSplash.zip also contains autosplash.au3 which is the source code for AutoSplash. It is not needed to run correctly and is only required if you want to modify the program yourself.
You can now unplug your USB drive and plug it back into the computer. You will be prompted with something similar to this:

When you click on OK, you will see the splash screen:

Customizing AutoSplash
Everything in AutoSplash is controlled by the autosplash.ini file:
[General] Title=Daily Cup of Tech ShowTitle=False ImageFile=SplashImage.jpg ImageWidth=587 ImageHeight=68 ShowTime=3
Download this code: autosplash.ini
Each setting in this file changes how AutoSpash works. It can be edited in any text editor such as Notepad.
- Title - This is the title of your splash. Can be any text value. It will be displayed if ShowTitle is set to True
- ShowTitle - Determines if the title is displayed on the splash screen. Can be either True or False
- ImageFile - The name of the image file to be displayed. Can be a complete path or just a file name. If it is just a file name, that file must be in the same directory as autosplash.exe
- ImageWidth - The width of the image file, in pixels, as specified by ImageFile. Must be a numeric value
- ImageHeight - The height of the image file, in pixels, as specified by ImageFile. Must be a numeric value
- ShowTime - The amount of time, in seconds, the image file will be displayed. This value must be numeric
Feel free to modify this file to fit your needs.
The Code
Now, for the ubergeeks in the crowd, here is the source code for this project. It is pretty self explanatory but if anyone wants more information about it, please feel free to leave comments!
autosplash.au3
;Autorun Splash Screen Dim $ConfigFile ;Configuration File Dim $ImageFile ;Image to be shown. Must be BMP,GIF or JPG Dim $ImageWidth ;Width of the image to display in pixels Dim $ImageHeight ;Height of image in pixels Dim $Title ;Title to be displayed Dim $ShowTime ;Length of time to display image in seconds Dim $ShowTitle ;Determine whether or not to display the title Dim $ShowTitleSetting ;Setting for ShowTitle $ConfigFile = _GetConfigFile("autosplash.ini",True) If $ConfigFile = "Error" Then Exit $ImageFile = IniRead($ConfigFile,"General","ImageFile","SplashImage.jpg") If StringMid($ImageFile,2,1)<>":" and StringMid($ImageFile,2,1)<>"\" Then $ImageFile = @ScriptDir & "\" & $ImageFile EndIf If Not FileExists($ImageFile) Then Exit $ImageHeight = IniRead($ConfigFile,"General","ImageHeight",68) $ImageWidth = IniRead($ConfigFile,"General","ImageWidth",587) $Title = IniRead($ConfigFile,"General","Title","Daily Cup of Tech") $ShowTime = IniRead($ConfigFile,"General","ShowTime",2) $ShowTitle = IniRead($ConfigFile,"General","ShowTitle",False) If $ShowTitle = True Then $ShowTitleSetting = -1 Else $ShowTitleSetting = 1 EndIf SplashImageOn($Title,$ImageFile,$ImageWidth,$ImageHeight,-1,-1,$ShowTitleSetting) Sleep($ShowTime * 1000) SplashOff() #region Functions Func _GetConfigFile($filename,$silent = False) Local $configfilename $configfilename = @ScriptDir & "\" & $filename If Not FileExists($configfilename) Then If Not $silent Then MsgBox(16,"File Missing","The file " & $filename & " is not available." & @CRLF & "Please ensure that it is located in the " & @ScriptDir & " directory." & @CRLF & "The application will now exit.") Exit EndIf SetError(1) Return "Error" EndIf Return $configfilename EndFunc #endregion
Download this code: autosplash.au3
autorun.inf
[autorun]
icon=autosplash.exe
open=autosplash.exe
label=Auto Splash
action=Show Splash Screen
shell\open\command=autosplash.exe
shell\open=Show Splash Image
Conclusion
This is a very simple program with a simple task. But, it does allow you to do some cool things. Let me know what you think about it and how it works!
If you found this post useful, why don't you buy me a cup of coffee to show your gratitude?
| Trackback link - http://www.dailycupoftech.com/usb-drive-splash-screen/trackback/ |
|

October 25th, 2006 at 11:45 am
It sure works great, Tim! I changed the SplashImage.jpg to one of my own with a pretty background and with a “I’m Lost” text. Of course, the image is only displayed for about 4 sec. I am STILL trying, however, to learn how to edit the .exe file. I have seen some of your instructions on the subject with the needed tools. Somehow, I have yet to succeed and make it work. Eventually, I will…
Thanks a whole bunch once again!
Lilian
October 25th, 2006 at 11:56 am
Thank you very much! I was playing with the autosplash.ini file, but no matter what I do when I run the exe it doesn´t show the image I’m pointing at… it keeps showing your logo (yeah I’m putting the width and height in the .ini too)
What’s the matter?
Thanks in advance, and kudos to your great work!
October 25th, 2006 at 12:28 pm
Ok I got it to work now, thanks again man, keep up the amazing work!
October 25th, 2006 at 12:35 pm
Sorry folks! I accidentally put an older version of the AutoSplash exe in the zip file. It should work properly now.
Tim
October 26th, 2006 at 12:36 am
Glad to inspire!
October 28th, 2006 at 5:25 pm
Great idea!
There’s a five percent chance a Mac person might find your lost drive. How about including an autorun message/graphic for them? Don’t ask me how to do it; I would guess an Applescript, but I’ve never bothered messing with them…
Thanks
November 3rd, 2006 at 12:54 pm
thanks! looks very handy. first I used the ‘lost USB drive’ program, wherein a textbox was used to show to the finder.
now the finder ‘only’ sees a picture of me, which leads me to this feature suggestion: can the program look for a printer and then automatically print the text?
November 3rd, 2006 at 1:50 pm
SamPieter,
This was a very interesting question that I did not know the answer to so I gave it a try and I have discovered that it can be done!
All you would need to do is create a text file called Readme.txt, save it on the root of your USB drive, download this UDF and save it in your AutoIt includes folder, then add the following code to the autosplash.au3 code above:
#include
_FilePrint(@ScriptDir & “\Readme.txt”) Recompile the autosplash.exe file and you are laughing!
Tim
November 7th, 2006 at 4:38 pm
When I enter the ShowTime value as more than one digit (more than 9 seconds) remove the drive, plug it back in again and open the autosplash.ini the only value saved is the first digit of the number.
Any help?
Thanks Callum
X
November 11th, 2006 at 7:42 pm
How can i make PStart or any other app. start automatically after splash screen? For example, i would like to run some app. (if you name some it will be very helpful) which will ask for user name and password and then give access to USB.
Thanks anyway for the work so far, very useful and easy to follow.
P.S. sorry if you have already done that, i just discovered this blog
November 16th, 2006 at 7:42 am
first i have to say; great work for this feature. again something found to customise my extern harddisk.
second i think i found a bug with the option ’showtitle’. it always shows the title, also when i set it on ‘false’.
third i have the same suggestion as the person above me. i also use PStart and i also want it to start direcly after the splashscreen.
yet another suggestion is to make the spashscreen clikable and then appair. so that if you want to work fast and dont want to wait for the screen to end, you clik on it and go futher with you work.
thnx and keep up the great work
gr J
ps. sorry for my bad english, im dutch
November 16th, 2006 at 9:59 am
Hey Tim it does work great for me , 2 questions I would like to ask.
a) How did you make that icon ‘autosplash.exe’
b)is tere a way so that if i want to show a character and text, it will popup without any backgorund.
Its just Kool..Thanks again. though I definitely create splash screens for my cds and dvds with all its contents.
Until Then,
Cheers
January 2nd, 2007 at 6:17 am
can the code run any html or flash file . Curently it open a jpg image.I need to autorun a flash screen . can i use this program?
Thanks in advance
Krishna
January 11th, 2007 at 1:37 am
Seems you can’t rename autosplash.ini (into for example “infosplash.ini”). I tried that and edited autosplash.au3 with this:
$ConfigFile = _GetConfigFile(”InfoSplash.ini”,True)
The trouble is, the splash won’t start if you change the name of autosplash.ini! Then I tried only to change the ini-file in autosplash.au3 leaving the actual file with the name “autosplash.ini” and I noticed it doesn’t matter if you change the config file’s name in autosplash.au3… is the name autosplash.ini hardcoded?
January 11th, 2007 at 7:25 am
Bobby,
That should work. Just remember that it is case sensitive.
Tim
January 22nd, 2007 at 1:36 am
Hi Tim. Great script
i cannot make the Readme.txt printeable… this is the error when i try to complile
>”C:\Archivos de programa\AutoIt3\SciTE\..\autoit3.exe” /ErrorStdOut “D:\Mis descargas\Splash_USB\autosplash.au3″
D:\Mis descargas\Splash_USB\autosplash.au3 (3) : ==> Cannot parse #include.:
#include _FilePrint (@ScriptDir & “\Readme.txt”)
>Exit code: 1 Time: 0.332
Thanks in advance
January 22nd, 2007 at 1:43 am
Solved…. ignore my last comment
i added this code:
#include
.
.
.
.
_FilePrint (@ScriptDir & “\Readme.txt”)
March 13th, 2007 at 7:45 pm
Im not very good with most terms when you say root of the usb drive in the sentense “Extract these files from AutoSplash.zip and copy them to the root of your USB drive” what do you mean the root? Could anyone tell me?
March 13th, 2007 at 9:15 pm
The root of the USB drive is the very top most level of the directory structure. For example, if your USB drive was assigned a drive letter of G:, then the root of G: would be G:\. Essentially, this means that you should not put any of the files in a directory on your USB drive. Just put them right on the top level of the drive structure.
For a better explanation, see Wikipedia.
Tim
March 14th, 2007 at 9:10 pm
Hey Tim,
What program should I use to compile? I have Bloodshed Dev C++/C. Obviously the code isn’t either.
March 14th, 2007 at 9:30 pm
Steven,
Pretty much everything on Daily Cup of Tech is coded in AutoIt.
Tim
March 22nd, 2007 at 4:24 pm
yes i just installed the first and second versions and they dont auto runcan you please xplain how to make th drove auto run
March 26th, 2007 at 6:09 am
oh,it’s really cool,thank you!
March 29th, 2007 at 9:04 am
I am realy enjoying these topics.
One question.
Can you make the autosplash run another exe on exit?
ie.
program2=program2.exe
March 29th, 2007 at 9:27 am
Thom,
Sure! This is relatively easy to do. In the code, simply add the following lines after
SplashOff()and before#region Functions$RunAfterApp = IniRead($ConfigFile,"General","RunAfterApp","")
If $RunAfterApp<>“” and FileExists($RunAfterApp) Then
Run($RunAfterApp)
EndIf
Then, add the following line to the end of the autosplash.ini file:
RunAfterApp=appname.exewhere
appname.exeis the name of the application that you want to run.All you should need to do is recompile the code and then away you go! Be aware that the application that you are running needs to be in the same folder as the autosplash application for this code to work. It is possible to make it work with the application being in a subfolder but that would require a bit more coding.
Tim
March 29th, 2007 at 9:31 am
WOW Thank you for such a qucik reply.
Now if I only knew how to do that
*starts looking at autoit .
March 29th, 2007 at 9:50 am
Thom,
This may make things a bit easier. I have rewritten the code and compiled it for you. Simply download AutoSplashWithAppRun.zip and use it as per the instructions above.
I hope that helps.
Tim
March 29th, 2007 at 9:53 am
Thanks, becuase I tried it and compiled it after having a quick look and I get stupid error messages.
Will be intrested to see what you have changed
March 30th, 2007 at 9:04 am
Tim, I recompiled the progam so I could have 2 (just to see if I still understood programming) and it works.
But I have lost the coffee bean.
I got plenty of Icons I can use, but how do you add the icon?
April 7th, 2007 at 8:25 pm
In one of Tim’s previous replies, he states that you can add when compiling. When I compiled it using “Compile Script to .exe” it shows an option for a custom icon. Also, I’m using Autoit v3
April 9th, 2007 at 8:41 am
Tim,
This is a very cool utility. But, how can you make it open the files for viewing after the splash, instead of having to right-click and explore?
April 27th, 2007 at 7:22 pm
Jerone and Tim:
Didn’t see anyone answer the question as to why the title always shows up even if you change the value in the ini…
the code i downloaded from here has:
If $ShowTitle = True Then
$ShowTitleSetting = -1
Else
$ShowTitleSetting = 1
EndIf
…which will always return true if there is anything at all in the ini file for ShowTitle=
the codeing fix would be to put quotes around the value in the if statement like so:
If $ShowTitle = “True” Then
$ShowTitleSetting = -1
Else
$ShowTitleSetting = 1
EndIf
…and then recompile.
the non code fix would be to remove a value in the ini file so it returns false… like so:
[General]
Title=FooBar
ShowTitle=
ImageFile=SplashImage.jpg
…hope im not stepping on your toes Tim by answering your visitors questions for you.
I really dig what you’ve done here… having fun building off it.
Used to use autoit years ago and hadn’t looked at it again till I found your blog… It sure has gotten better over the years.
April 27th, 2007 at 9:41 pm
Hey Tim:
You Inspired me so I mashed up some of your code and then added some features…
Check it out if you like: KeyRun v1.0
I credited you in the source code and the info file… tried to improve and make it more multi purpose… hopefully someone else will pick it up and add to it as well
-JDL
May 3rd, 2007 at 3:20 pm
Hi awesome little app it seems to have opened alot of doors. One question I have, is it possible to just display the image of choice and not have the title bar and such so it doesn’t look like a pop up?
Thanks
May 31st, 2007 at 9:30 pm
Tim…
Outstanding apps. Both this one and your original.
A question: Would it be possible to keep the jpeg image on the screen indefinitely and just add an “OK” button to close it? I would like to create a jpeg photo of our son with contact info in the image if he gets lost (similar to the guy who’s son was lost at Disneyland).
Many Thanks….
August 22nd, 2007 at 6:03 pm
Thanks very much for the app. I had no prior knowledge of scripts.
What I have seen so far: Found that the demo script behaves differently from PC to PC. All are running the “same” OS e.g. XP Pro or home. Behaviors include: System finds USB device, displays the auto splash, closes splash screen ejects USB device and continually repeats. Other PCs don’t load the “bean” image on the auto splash screen. I have one PC which runs the script as intended. What am I missing?
August 28th, 2007 at 9:05 am
i’ve made a modified version of this usb splash screen. this version has fade out effect and allows you to set transparency.the transparency settings can be changed in the Splash.ini
i’ve also include a splash that i’ve made in photoshop with the .psd so you can easily make one your own . you can always use a different image if you don’t like mine. source code(.au3) and everything included. you can change the colour of those laser effects on photoshop too and remember to replace my logo with somthing else ahha.
Download From RapidShare.com [.zip]
Download From MediaFire.com [.zip]
Screenshot From ImageShack.com
August 31st, 2007 at 8:08 pm
I was also wondering how to view the files on the USB drive after the spalsh screen. Is there a way to autorun or auto open the drive after teh splash screen finishes ?
September 17th, 2007 at 12:44 pm
same question as above ^, is it possible? also would it be possible to get it to open the root of the usb if you went my computer> mem stick ? cos now i have to right click explore, id rather just be able to double click and open the root or even better flash the splash then open the root. thanks in advance
September 19th, 2007 at 2:19 am
yeh it is possible, i made a mod here for u. try it out tell it me if it works. i tested it out already so it should work. you can also set the directory u want to open after the splash too. read the splash.ini file for instructions. source (.au3) included. hope u like it.
Download from mediafire
Download from rapidshare
as for the ur question MattGooch, yes you can. for your autorun file u should use something like this:
[autorun]
open=Splash.exe
action=Start Splash
icon=Splash.exe
don’t use the ’shellexecute’ command. if u use the ‘open’ command your autorun option will onli be displayed in the autorun menu that pops up when u plug in ur usb. so when u double click on ur usb it’ll take u to the root of ur usb. Read more about autorun.inf here
hope this helped. =]
October 4th, 2007 at 10:57 pm
I don’t understand exactly what all this program does…BUT…I need something that will automatically give me a very noticable CONTINUOUS message of my choosing on the lower right corner of my desktop when a particular USB Flash Drive is plugged in and then that message will be gone when it is unplugged… etc… etc… Can this program do that?
Thanks
October 16th, 2007 at 11:12 am
This is a very useful app. Thank you!
I’d like to modify it slightly to fix the following: I often have more than one USB drive in use; sometimes both are plugged in to the same machine, sometimes I use one or the other.
I’d like this program to run on both drives (that’s easy), and to have each drive show a *different* icon in my computer and in the address line of IE explorer so that I always know quickly which drive I’m using. Right now, they both have a coffee bean, and that can be confusing.
How do I change the coffee bean image to something else? I tried recompiling with a new icon file, and that changes the icon for the autosplash.exe file itself, but not the icon displayed for the drive in My computer or explorer.
October 31st, 2007 at 6:22 am
hello
i have been looking for a slash screen for months now, im so glad i found one, thankyou..
oh, how can i make it run as soon as i pug my USB in?
because my ‘Auto run’ doesn’t always come up.
yet again great work
x
November 15th, 2007 at 11:12 am
This programme is a great little tool. The only problem i am finding with it is that it wont autorun on a 2000 machine. Also i would really like it to run by default rather than using the XP autorun window. Does anyone have ne smart ideas?
November 28th, 2007 at 4:32 pm
For Sandisk Cruzer users, you can just use the installer to get this on a cd partition. That way, no autorun screen shows up, and the finder doesn’t ignore it.
January 2nd, 2008 at 3:03 am
Hello Tim,
Great idea….I plan on addressing this in my preparedness blog and ICE4SAFETY website as a potential component to USB travel drives used to store emergency information that might be lost…Would like to make sure I have the latest simplified how-to info and debugged programming to supply others (fully credited to you). Thanks
January 2nd, 2008 at 3:03 am
Hello Tim,
Great idea….I plan on addressing this in my preparedness blog and ICE4SAFETY website as a potential component to USB travel drives used to store emergency information that might be lost…Would like to make sure I have the latest simplified how-to info and debugged programming to supply others (fully credited to you). Thanks
Mark
January 15th, 2008 at 2:06 am
Hi whats going one .. iv downloaded Keviin files at the reply
37 and my anti virus program gave me allot of warnings
whats up with him
January 17th, 2008 at 11:56 am
Wow, that AutoIT is a neat thing. I was interested in your program so I downloaded AutoIT V3 and installed it, and then loaded in yor app for editing since I also wanted to do what Thom suggested (run another app after the splash.) I realize now that I should have continued to read the comments, but as usual, I just barelled ahead…I became obsessed with the fact that I couldn’t get the title bar to disappear, short of hard-coding a “1″ into the SplashImageOn function. I decided to revisit it after adding in the code to execute the “after” app, and it was there I discovered the incorrect use of the = operator in the line:
If $ShowTitle = True Then
According the help file, I think it should be:
If $ShowTitle == True Then
…at least that’s what it took to get it working for me. I think it is a more correct solution than putting quotes around the boolean “True” value.
And hey, really great site by the way - I look forward to exploring it more.
February 6th, 2008 at 6:57 pm
Hey Tim
thanks alot for this ingenius program.I have just ordered a flash drive off ebay.Im putting this on my car keys,so hopefully if i lose them again someone might think “SCORE!!! A FLASH DRIVE” and then find my details and hopefully return my car keys.or knowing my luck some chav will pick it up and stomp all over it just to see it break
is there anyway of making this program write protected to stop someone deleting it without my permission,so at least if someone doesnt have the curtesy give me a call,it will always give them a message when ever they use the drive to remind them that they are a bad person.
thanks
Dean
March 19th, 2008 at 1:55 am
Hi
Im a student and am very careful about looking after my USB so when i read about this program i was just so happy.
It is brilliant and it is a great way to have your USB returned.
I recently lost a very nice, expensive USB and this program has made me feel a lot more hopeful for next time i misplace one!
Thanks so much
March 19th, 2008 at 12:36 pm
Hey I was wondering if there was a way to put in an animated gif or .swf so that the banner had animation. I tried just plugging it in, but no go. any suggestions?
March 26th, 2008 at 9:17 am
Hi, great little program.
is it possible that when you plug in the thumb drive the splash screen appears immediately rather than the contents of the drive?
April 3rd, 2008 at 2:12 pm
Hi, this is very cool! I have the same question as Richard above, can the splash screen just pop out? I personally [almost] never choose any other option than Open folders, to see the drive’s content, so maybe other users would do that too and just don’t mind the message in the drive’s name, or right click, I think the splash one, or the pop-up box are the important ones, and can be skipped.
May 7th, 2008 at 10:14 am
This is such a great program. I had read about the initial version, and am glad to see that there is now a splashscreen version. Really great work.
May 7th, 2008 at 11:12 am
Oh wow, this is great, I have it set up now so that the splash screen shows up when you click on the drive, then fades out, and then portableapps menu starts. This is great.
June 11th, 2008 at 7:49 pm
hey,
this is a fantastic little app and is really handy for telling people where to return your drive!. I currently want it to execute another EXE after the splash image has disappeared. I don’t know how to do this or even how to edit the source code. Any help would be much appreciated!
June 13th, 2008 at 4:00 pm
Hey very nice post and app it dose what i need it to ty
June 13th, 2008 at 5:11 pm
Hello,
Im trying to add the “fade out version” to the “load app after version”
im having trouble combining the to scripts and getting them to work.
If any one can help me with this or compile the .exe that works this way it would me amazing i will still try to make it myself if i get it ill post it :p ty
June 20th, 2008 at 11:54 am
Great Idea !!!
Congratulations.
June 23rd, 2008 at 5:23 pm
I’m trying to get an mp3 to play when I bring up the app, pease help.
July 2nd, 2008 at 4:47 pm
Hey guys,
It is a great script, but helas its not working for me, I at first used a .PNG image file with a custom name and changed the path and size in the .ini, It didnt work, Then I changed the image to a .JPG image and it still didnt work, then I even changed the filename to what the original name was, Didnt work either. Can anyone help me? Thanks in advance.
November 10th, 2008 at 3:47 am
Hey there,
I’ve got a question… Is it possible to add a sound to the splash screen?
Thanks in advance.
Alexander
November 25th, 2008 at 8:59 am
Hi,
Just started with AutiIT and your script. I’m having troubles getting my own jpg to appear. I have a picture which I’ve renamed as SplashImage.jpg and replaced your jpg with this, but nothing appears at all. Changing back to your image and all is OK. Title, Imagewidth, Imageheight and Showtime options all appear to work OK but not ImageFile. Do you have any ideas, please?
Regards,
Robin