Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 5th, 2003, 12:28 PM
Authorized User
 
Join Date: Jun 2003
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Default Scheduled Task Reading Registry

Hi.

I have a VB 6.0 executable that constantly reads/updates some Registry settings. When I execute the program it works fine but when it's executed as a Scheduled Task the Registry settings aren't read/updated.

Any thoughts/suggestions would be greatly appreciated.

Rita
 
Old November 5th, 2003, 01:07 PM
Friend of Wrox
 
Join Date: Aug 2003
Posts: 205
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Is the machine logged in when the task runs (I think you need to be logged in for the tasks to run). Also who is the task running under? Does that person have the necessary rights to read and edit the registry?
 
Old November 5th, 2003, 03:02 PM
Authorized User
 
Join Date: Jun 2003
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Yehuda.
I finally figured out what was happening. You have to run a Scheduled Task as a User and I was changing the Registry settings as a User that was not the same as that running the Task. Once I logged on as the Scheduled Task User, I could see the changes I expected in the Registry, plus any changes I made to the Registry were correctly processed.
BTW, you don't need to be logged in as the User, it just uses the User's permissions/access rights.





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add task in Scheduled Task programatically amitjoshipune C# 2 July 31st, 2008 05:42 AM
Getting the "Last Result" from a Scheduled Task? janama .NET Framework 2.0 1 April 29th, 2008 12:37 AM
Scheduled task langer123 Classic ASP Basics 0 March 16th, 2005 11:14 AM
[c#]scheduled task maddonuts General .NET 1 July 7th, 2004 11:53 AM
Scheduled Task Ben Access VBA 1 February 24th, 2004 02:05 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.