Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: run executable (script) @ startup / login (before explorer.exe?)

12 Apr 2014   #1

Windows 7 Ultimate 64bit
run executable (script) @ startup / login (before explorer.exe?)

Hi, everything's going well, fixing an issue a day, but the solution to this continues to elude me...

I have a (taskbar) toolbar (like quick launch) that shows the folder contents (as usual, like quick launch) on the toolbar. The target folder resides on a virtual volume, that's always attached....

One of the problems is that I don't know how windows (internally) performs this (virtual volume) load/mount/attach operation....

I had used VHDAttach or something in the past... until I realised
  • there are NO safety controls - if you (context) detach the (system C:\) VHD, it's goodnight vienna - eternal sleep! Dead virtual machine!
  • the "nice to have's" offered out-of-the-box are all easily attainable with a bit of (diskpart /s script) batch magic

The problem is that I have to restart explorer after login to refresh the systemiconcache; by then, the volume is attached, and the icons are read (as normal) and displayed...

I'm running attachLBS.bat @ (can you believe User Startup isn't in C:\users\username\startup?!) - this gives the volume a path letter (L... but it doesn't run in time..

So! My question is - how do I make windows ensure an operation is completed (attach volume, for example) BEFORE explorer.exe performs it's "display shell / user interface" task?!


My System SpecsSystem Spec
12 Apr 2014   #2

Windows 7 32 bit

You can try my RunIt utility downloadable here:
Miles Ahead Software

It uses the Regisry Run key to run a batch or program before login. If what you are running requires Run As Administrator you may get a UAC prompt.

See the included Readme.txt file for usage info.
My System SpecsSystem Spec
13 Apr 2014   #3

Windows 7 Ultimate x64

A possibility could be to use Task Scheduler, as it lets you run programs before any user logs in (therefore, before explorer starts). Just put it in a trigger with an event of "system startup" and it will run before everything.
My System SpecsSystem Spec


 run executable (script) @ startup / login (before explorer.exe?)

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar help and support threads
Thread Forum
Turning on login script i.e. at Starbucks cafe
hi guys, It seems I disabled something but when I connect to any wireless networks that require a browser login, i.e. at a starbucks, hotels, etc I don't get by default their login page when launching any browser (ie, chrome, ff), in most cases I have to type, for me is fine but...
Browsers & Mail
Login script problems
We recently moved to a different domain, previous to that, OUR DC had our login script and all worked well. The login script is defined in our GPO and works well for everyone else (running XP), I'm the only one on Win7 and its not running for me. Its a simple .vbs script. The odd thing is,...
Network & Sharing
executable script to switch active displays
I have a dual monitor set up in my office with a 23" Asus connected via DVI and a 19" Sony connected via VGA and adapter to my custom build. In my living room I have a TV connected Via Receiver Via adapter(composite/s-video) Via s-video to my same custom build. At the moment I have to go in to...
Graphic Cards
Auto Login Script For Wifi Hotspots?
I've been trying to find a way for the follwoing to happen; My mum and dad have a static caravan and have paid for the sites wifi for the year, which works fine. When you open a browser it autoredirects you to a login page which needs your username and password. This is fine for their...
Network & Sharing
Antimalware Service Executable: hogging my resources at startup
Well, the thread says it all. Upon loging into Windows (either after powering on the PC or just using a restart), I can clearly see that the Gadgets take a long time to display on the desktop, even though, of course, the sidebar.exe process is loaded immediately. About a minute or two into the...
System Security

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 09:17.

Twitter Facebook Google+

Windows 7 Forums

Seven Forums Android App Seven Forums IOS App