I have a requirement to execute a program that will run
after the user has logged off.
Although the simple answer is to execute it under a
specific User Account, I am restricted to running it under
the initiators account (the information is required by the
executed program and I dont have the luxury of modifying
I've tried to set the STARTUPINFO properties
dwFlags = 1
wShowWindow = 0
and also tried to set the lpDesktop property to both NULL
and empty string. Neither of these did anything different.
Since I got nowhere with this, I attempted
lSuccess = OpenProcessToken(GetCurrentProcess,
.cb = LenB(udtStartInfo) 'Size of the
.lpReserved = &H0& 'Reserved
.cbReserved2 = &H0& 'Reserved
.dwFlags = 1 'Use the wShowWindow parameter
.wShowWindow = 0
udtProcessAttributes.nLength = Len
udtThreadAttributes.nLength = Len(udtThreadAttributes)
lSuccess = CreateProcessAsUser( _
Here, I get the error
1314: A required privilege is not held by the client.
I have also attempted the LogonUser() call, and get the
same error returned.
I read MSDN and still cannot come up with anything.
Can anyone help?