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: Launch a program on boot - delayed, with no UAC.

07 Mar 2014   #1
Callender

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
 
 
Launch a program on boot - delayed, with no UAC.

Hi,

I've been looking for a way to launch programs on startup without installing any "startup delayer" type of software. This post has been edited to include the solution that was kindly provided by MilesAhead.

Perhaps this method might suit other users.

I started with a single program as a test. Other programs can be added to the batch file if needed.

1). Create an elevated shortcut to the program. See: Elevated Program Shortcut without UAC Prompt - Create

2). Create a batch file to launch the program with a delay and save the batch file in the following location:

%Userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

Launch a program on boot - delayed, with no UAC.-startupqueue2.jpg

Example batch file (not for use on other machines):

@echo off
192.0.2.2 -n 1 -w 10000 > nul
C:\Windows\system32\schtasks.exe /run /tn TASKNAME

In the above example 10000 (milliseconds)sets the required delay of 10 seconds- use a higher or lower number if needed. Replace TASKNAME with the name of your task. You can find it in Task Scheduler. (Start > Run then type Taskschd.msc then click OK).

Note: You may get better results if you substitute the line

192.0.2.2 -n 1 -w 10000 > nul

with

ping -n 40 127.0.0.1 > NUL 2>&1

For this test
elevated_RegWatcher_rehctaWgeRJM2_xoblooTpotkseDsirhCsresUC is the task name as shown in Task Scheduler.

Screenshot of Task Scheduler:

Launch a program on boot - delayed, with no UAC.-task-scheduler.jpg

If you have security software on your machine that might interfere with unknown files that attempt to run be sure to set it to trust the file that you created.

Launch a program on boot - delayed, with no UAC.-trust-level.jpg

Reboot.

That's it.




My System SpecsSystem Spec
.
09 Mar 2014   #2
MilesAhead

Windows 7 32 bit
 
 

ping for delay using 127.0.0.1 does not work as expected.

scripting - How to wait in a batch script? - Stack Overflow

relevant excerpt:

NOTE: The 192.0.2.x address is reserved as per RFC 3330 so it definitely will not exist in the real world. Quoting from the spec:
yadda yadda
My System SpecsSystem Spec
09 Mar 2014   #3
Callender

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
 
 
Wait in batch script

Quote   Quote: Originally Posted by MilesAhead View Post
ping for delay using 127.0.0.1 does not work as expected.

scripting - How to wait in a batch script? - Stack Overflow

relevant excerpt:

NOTE: The 192.0.2.x address is reserved as per RFC 3330 so it definitely will not exist in the real world. Quoting from the spec:
yadda yadda

Hi,

Thanks very much indeed for the advice. The script that I'm using seems to work okay and I've tested using different delays.

I got the suggestion here:

command line - windows ping cmd help - Super User

and looked here plus a few other places:

command line - windows ping cmd help - Super User

Also tried the following - neither of them worked:

@echo off
start "" "C:\Users\Chris\Desktop\Toolbox 2\MJRegWatcher\RegWatcher.exe"
timeout /10

@echo off
start "" "C:\Users\Chris\Desktop\Toolbox 2\MJRegWatcher\RegWatcher.exe"
timeout /t 10

Then I tried using wait and sleep and also tried including RUNAS but nothing worked.

If I understand you correctly I should use a non-existent address?
My System SpecsSystem Spec
.

10 Mar 2014   #4
MilesAhead

Windows 7 32 bit
 
 

Quote:
If I understand you correctly I should use a non-existent address?
Right. I was doing the same thing for a delay. I was only going for a 5 or 10 second delay. That's probably why I never noticed the discrepancy. In the link I posted this ping is used:
ping 192.0.2.2 -n 1 -w 10000 > nul

by using a non-existent address it allows you to use the -w param to get longer delays. As this person pointed out, if you use 127.0.0.1 that's the current host. It will answer the ping. So the -w will never time out. By using an IP guaranteed not to exist, the value for -w will time out on every ping. In his example to get a minute delay instead of 10 seconds you can change the -n value to 6 etc..

I should have organized code snippets. If I did for batch, that would be one of them.
My System SpecsSystem Spec
22 Nov 2014   #5
Callender

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
 
 
Launch a program on boot - delayed, with no UAC - Updated.

I've just found another solution. Tested on my machine and working just fine.

Software required:

AUTORUN ORGANIZER 1.31 - Advanced Autorun Manager for Windows

Alternate download:

Download Autorun Organizer - MajorGeeks

How to use:

Create an Elevated Shortcut with no UAC prompt - to the program that you need to run on startup. See the tutorial here:

Elevated Program Shortcut without UAC Prompt - Create

Once you have created the Elevated Shortcut get the taskname from task scheduler. In this example I've created an Elevated Shortcut for the process Regwatcher.exe
Launch a program on boot - delayed, with no UAC.-task-scheduler.jpg
Then run Autorun Organizer by right clicking and choosing "Run as Administrator"

In the window that opens click the "Add" button in the toolbar. Enter the path as shown:

C:\Windows\system32\schtasks.exe /run /tn taskname

If your taskname contains spaces - wrap the taskname in quotes.

Give the Startup Entry a name.
Launch a program on boot - delayed, with no UAC.-add-new-startup-entry.jpg
Click "Forward"

Choose a location for the entry - refer to the registry locations shown in Method 4 of the tutorial here:

Startup Programs - Change
Launch a program on boot - delayed, with no UAC.-add-new-startup-entry-2.jpg
Add the desired location then click "Finish"

Highlight the entry that you've just created and choose the required delay in seconds. Click the drop down arrow to manually input a delay.
Launch a program on boot - delayed, with no UAC.-delay-load.jpg
Tip   Tip

You can right click any existing entry shown in the Autorun Organizer window and set a delay.


A new task will be created and is shown in Task Scheduler under "DelayedItemsByChemtableSofware"
Launch a program on boot - delayed, with no UAC.-task-scheduler-delayed-items.jpg
Edit:

Note   Note

Unfotunately once Autorun Organizer has done it's job and all delayed startup items have launched it will leave a process running in the background - StartupCheckingService.exe


However you can actually use AutoRun Organizer to launch a delayed batch file to kill it's own running process.

Here's how:

Copy the following into notepad and save it somewhere handy as a batch file.

Code:
@echo off

TASKKILL /F /IM StartupCheckingService.exe
Add the batch file to the delayed startup list by adding it's file path.
Launch a program on boot - delayed, with no UAC.-stop-autorun-organizer.jpg
Choose a sufficient delay - the batch file must run only after all other delayed items have launched.


My System SpecsSystem Spec
Reply

 Launch a program on boot - delayed, with no UAC.




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
How do I delay the launch of a program
For security reasons - I need my firewall to be set up correctly before any program that uses the internet is started - I would like to delay the launch of any program by, say 50 seconds. Do note that I would like to apply this policy to a program that is manually launched by the user - in my case,...
General Discussion
Am I able to do this. Launch a program at a higher default priority?
Hi all, I am wondering if there is a way in windows 7 home premium 64-bit to say, have 7-zip's priority be set to high anytime the program is launched by using the 7-zip.exe or by double clicking a compressed file. Is this doable some how?
General Discussion
Program Sets Off Windows Defender At Launch
I have this old program I like to use, Freehand 7 (1995), but no matter what I do in Windows 7 I get the User Account Control Defender Box saying "Do you want the following program from an unknown publisher to make changes to this computer?" I tried installing the program elsewhere, even in the...
Software
Delayed boot
Windows 7 Pro 64bit. After boot up all desktop including gadgets appear but the Messenger does not/takes a long time. I disabled Messenger from the start-up list yet this did not help and the delay continued. I have read a tutorial about diagnosing delayed boot up but it is beyond my knowledge and...
Performance & Maintenance
Program for alphabetizing my quick launch icons?
Does anybody have any ideas of a program out there for alphabetizing my quick launch icons?
Software
Way to launch 2 instances of program at once
Being lazy here but is there a way to launch 2 versions of imgburn at once? Say a desktop icon I can click on or something like that?
General Discussion


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 05:37.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App