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: Schedule task to run when a new profile is created using Win 7

12 Oct 2012   #1

Winodw 7 Pro 64-bit
 
 
Schedule task to run when a new profile is created using Win 7

I need to replace a RunOnce procedure from XP. Using it with Win 7 is interrupted with UAC prompts which is an unacceptable option and disabling UAC within our environment is not an option. I am attempted to replace the process with Task Scheduler. However, I only want this to run when a new user logs on to the PC. I am open to other suggestions if this canít be accomplished through Task Scheduler, but the solution can only run when a new profile is created.


My System SpecsSystem Spec
.

12 Oct 2012   #2

Windows 8.1 Pro RTM x64
 
 

Hi jennnnnnn and welcome Windows 7 Forums

What is the function of this procedure?
My System SpecsSystem Spec
12 Oct 2012   #3

Winodw 7 Pro 64-bit
 
 
What the original RunOnce accomplished.

Originally the RunOnce from the default profile was used to launch a local VBS which ran three batch files which edited the registry when a new profile is created.
My System SpecsSystem Spec
.


12 Oct 2012   #4

Windows 8.1 Pro RTM x64
 
 

What specific changes did the routine make to the registry?
My System SpecsSystem Spec
18 Oct 2012   #5

Winodw 7 Pro 64-bit
 
 

A new key is added to HKEY_Current_User\Software and then three more are added to that key. If you need more info let me know.
My System SpecsSystem Spec
18 Oct 2012   #6

Winodw 7 Pro 64-bit
 
 

I can get Schedule Task to launch my task when a new profile is created from a batch file in the Runonce of the default profile. However I am still getting a UAC prompt due to the registry writing. I have the task set up to run using a System account but I still get prompted. Any suggestions?
My System SpecsSystem Spec
18 Oct 2012   #7

Winodw 7 Pro 64-bit
 
 
Schedule Tasks still gives UAC

According to this website Schtasks - Scheduled tasks | SS64.com I should be able to create or run a task and use /RU to use a system account. The site says "For the system account, /RU username can be written as "", "NT AUTHORITY\SYSTEM" or "SYSTEM", a Password is not required. The system account has full access to the local machine", yet I always get prompted for UAC approval. It doesn't ask for credentials, but I do have to repond to the prompts. Any assistance will be appreciated. The task writes a key to HKEY_CURRENT_USER when a new profile is created via a RunOnce batch file.
My System SpecsSystem Spec
18 Oct 2012   #8
Microsoft MVP

64-bit Windows 8.1 Enterprise
 
 

Hello Jen, and welcome to Seven Forums.

You may be able to use either tutorial below to create an elevated shortcut with, then run the shortcut in the RunOnce registry entry.
Elevated Program Shortcut without UAC Prompt - Create

OR

Elevated Program Shortcut - Create for Standard User
Hope this helps,
Shawn
My System SpecsSystem Spec
19 Oct 2012   #9

Winodw 7 Pro 64-bit
 
 

I am trying to use the above recommendation but I need the shortcut to run using a system account. Here is the part I need assistance with. "runas /user:Brink-PC\Administrator /savecred " Below is the entire line.

runas /user:Brink-PC\Administrator /savecred "C:\Program Files\CCleaner\CCleaner.exe"
My System SpecsSystem Spec
Reply

 Schedule task to run when a new profile is created using Win 7




Thread Tools



Similar help and support threads for2: Schedule task to run when a new profile is created using Win 7
Thread Forum
Schedule a task for when computer is idle Performance & Maintenance
how do schedule a task when another program exists Software
how to set a schedule task to run chkdsk General Discussion
Schedule a task Customization
Task Scheduler not executing a schedule application General Discussion
How do I schedule a Windows task to run in the foreground? Software
Can I schedule a XP Mode task from Win 7? Virtualization

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:33 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33