SCarter Posted October 29, 2013 Posted October 29, 2013 We are trying to limit the user's direct access to data on the network. The users have access to the programs, but not direct access to the data. The Service id has the direct access to the programs and data. When I do a Shift Right Click and run my AutoIt program with the Service Id and Password the RunWait works correctly. When I run the AutoIt program with the user's id and password then call RunAsWait, I get errors. 1) Run icon ServiceId - RunWait ($sCallProgram) works 2) Run icon as UserId - RunAsWait($sServiceName, @LogonDomain, $sServicePassword, 0, $sCallProgram, @WorkingDir, @SW_MAXIMIZE) Logon_flag = 0 gets error 1326, 1 gets errror 1326, 2 gets error 267, and 4 gets error 1783 Any suggestion would be welcomed. I tried looking on the Forums, but I didn't find much. I did see a brief statement that both the user and service id's would need access to the data. but that is what we are trying to prevent.
Developers Jos Posted October 29, 2013 Developers Posted October 29, 2013 What is the actual workdir and does the elivated account have access? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
SCarter Posted October 30, 2013 Author Posted October 30, 2013 It is the directory where there programs are being called. Both ids have the access to the programs. I tried the program hardcoded too.
SCarter Posted October 30, 2013 Author Posted October 30, 2013 I've got a workaround to this problem. My program was setting some environment variables to the data location before it was calling the RunAsWait. So I broke the progam into 2 seperate programs. The first program validates the user can log into the system and run the programs. Then it calls the program to set up the environment and data using the RunAsWait using the service id. This fixed the problem I was getting with the different logon_flag errors.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now