Jump to content
Macro Express Forums

Macros Running On A Locked Workstation


IceBox

Recommended Posts

Does anybody know the extent of Macro Express' functionality while a workstation is locked? I have already found out that a scheduled macro will still run if the workstation is locked. The functions I know it can perform on a locked workstation are:

 

1. Display a text box

2. Launch an application

 

I am sure there are others, but these two I know from testing.

 

So is there a distinct list of commands that do/don't work on a locked workstation documented anywhere?

 

And the most important question... Does anyone know how to get Macro Express to unlock your workstation? If that is possible, then I can have MacExp unlock the station, do what I need it to do, and then re-lock it.

 

Any help would be appreciated.

 

-- Michael

Link to comment
Share on other sites

I haven't found a way of persuading ME to unlock a workstation. What I do, every night, is run a scheduled ME macro which:

- changes the registry so as to avoid any requirement for a password

- reboots my computer

- runs that night's processing

- restores the password requirements

- hibernates the machine

 

Note that this macro is started by the Windows scheduler, as I haven't been able to get the ME scheduler to work when the workstation is locked.

Link to comment
Share on other sites

  • 2 weeks later...
Thanks Paul!  That sounds like a perfect workaround.  Do you have the code that is needed to make the registry changes (And change it back, of course)?  I am using Windows 2000.

I use Windowx XP, but I imagine the 2 registry values below are equally relevant to Windows 2000.

 

Here's the macro I wrote together with comments.

 

Variable Set String %T1% "1"

-- for some reason, the registry value AutoAdminLogon is a string value

 

Macro Run: lo

-- this returns my Windows password in variable T99

 

Write Registry String: "AutoAdminLogon"

-- save T1 into HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoAdminLogon

 

Write Registry String: "DefaultPassword"

-- save T99 into HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultPassword

 

Program Launch: "shutdown.exe"

-- parameters are -s reboot -f -l 10

-- which translates to

-- Shutdown method=reboot

-- Force applications to terminate

-- Display message for 10 seconds (in case I'm using the machine and don't want to reboot)

 

You can get the shutdown utility from here:

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

 

One curiosity I'm still trying to understand:

One of the jobs I need to run uses SQL Server, for which I use Windows authentication - i.e. I rely on my windows userid and password to give me access to SQL Server. Running such a job from an ME macro which itself was run via the startup macro I invoke when starting ME does not give me such access - my credentials don't seem to work. So I'm in the process of creating a scheduled task with ME to run this SQL Server job, and I believe that will work OK.

 

To restore the normal logging in procedure, change the AutoAdminLogon value to 0, and delete the DefaultPassword value.

 

Let me know how it goes.

Link to comment
Share on other sites

One curiosity I'm still trying to understand:

One of the jobs I need to run uses SQL Server, for which I use Windows authentication - i.e. I rely on my windows userid and password to give me access to SQL Server. Running such a job from an ME macro which itself was run via the startup macro I invoke when starting ME does not give me such access - my credentials don't seem to work. So I'm in the process of creating a scheduled task with ME to run this SQL Server job, and I believe that will work OK.

This was a red herring! The real cause of the problem (which I failed to realize even though I've run the routines manually for months!) was that in a .bat file, running a macro using Meproc returns control to the .bat file immediately, long before the macro has finished its business. So there should be no issues running stuff as soon as the machine reboots, although being able to schedule tasks using Windows XP's SchTasks.exe utility is quite elegant.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...