How automate the logging into computer

sjl

Registered User.
Local time
, 21:05
Joined
Aug 8, 2007
Messages
221
Hello,

I need VBA code to run each early morning and shoot off an email if a date is 10 or 4 weeks away.

Using Window's Task Scheduler I can successfully open Access (on schedule) and get the VBA code to run which generates the emails. I also can get Outlook to open via the Windows Task Scheduler .

The problem I am having is that if my machine is locked/I’m logged out, (which is what we are told to do before leaving the office each day), Outlook will not send the emails until I log on once I return to the office. (I don't understand this, but this is the case).

This is problematic b/c I am often not in the office for 3-4 days at a time, and if I schedule Access to close after it runs (which I need to for security reasons), then the emails are not even put in queue to send later(!)

So, I need to be able to automate the logging into “my computer” each early morning. (i.e., into that Windows log in screen).

Has anyone had this roadblock?

I don’t know what the program is called that pops up the Windows log on screen; I just need the executable to be able to schedule it (I’m assuming).

When I asked our tech guy, he said the automation of the login is just not an option (for security reasons). Is this that big of a security issue? (The way I envision it, the Task Scheduler would merely log me in and then out within 5 minutes.)

Any suggestion much appreciated.

sjl
 
You may need a command-line email program:

http://www.beyondlogic.org/solutions/cmdlinemail/cmdlinemail.htm

You can run that with a shell command and it *should* work if your computer is locked/not logged in, but I'm not positive.

I don't think using Outlook will work, and I really doubt you could automate a login to windows without a LOT more code than you probably want to write.
 
Management will need to decide if your process (The email) is important enough to overide IT guidelines regarding leaving the computer logged on.
 
There is no program you can call or execute to log back on to your PC.

You could automate the logon by changing and adding certain registry keys on your PC, I'm not going to post specifically which ones, but a search of Microsoft.com will give you all the information you need.

The big security risk here is that in order for the registry solution to work both your user id and password must be stored in plain text within the registry, this is obviously a dangerous thing to do if your PC is not in a secured environment.
 
George D:

Isn't this what servers are for?

Yes. That is what IT here has decided. But, I am confused (since I know very little about hardware). My database is currently sitting on a "server". By putting it out on a (special?) server, I'm assuming individual log on IDs/PWDs are not needed....

My basic question is how can I get Access to automatically open up...on this different server? (I had been able to do so with Windows Task Scheduler).

thanks
sjl
 
The MS Access database file(s) is stored on the server. It does not 'run' on the server hence you can not do any vb/macro automation stuff off of the server.

Unless you can talk the server admin to let you do this and that's highly un-likely.
 
The MS Access database file(s) is stored on the server. It does not 'run' on the server hence you can not do any vb/macro automation stuff off of the server.

Unless you can talk the server admin to let you do this and that's highly un-likely.


Not sure I understand. Are you saying that there is unlikely a way to get the database to open automatically each morning and run....out on this (new) server?
 
The server admin should be able to tell you that -

My suggestion is to run it on your local workstation and lock it everynight and not log off.
 
The server admin should be able to tell you that -

My suggestion is to run it on your local workstation and lock it everynight and not log off.

Ken,
thanks so much. sounds like you've been down this road before.

I must have done something wrong in scheduling/locking my w-station--and maybe you can tell me where....

In the Windows Task Scheduler, I automated the opening of Access (and my form). It runs, on schedule, and generates the email (via SendObject)

I leave my Outlook open and running at all times(I.T. suggested I do this for the needs of this project).

I.T. also suggested that I just lock my workstation--not log off. BUT (during testing) whenever I unlocked my workstation it was prompting me for the log on password. And, therefore the emails do not get sent. I just do not understand why if I am only LOCKING the machine it will not run....due to the need of my LOGON ID/PWD....?
 
You can run things in task scheduler and put a password in there which will work if the workstation is locked. If you are getting the standard login when you return the next day, then your computer is probably being rebooted by the server each night. This is likely to make sure that patches and updates get installed. What you will need to do is see if the IT guys can put your computer in a no-reboot group so it won't auto reboot. You'll be responsible for rebooting yourself to get patches and updates necessary.
 

Users who are viewing this thread

Back
Top Bottom