Automating shell commands

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I successfully execute the command
cacls \\machineName\c$\folderName\*.* /t /e /g student:f
from the command prompt to any computer in my workgroup and I even automate
it with batch files. All the computers in my workgroup have the same users
and passwords. But when I use the shell function in Access 2003 to automate
setting permissions to files in my workgroup the permissions are applied in
the remote workgroup computers with an Account Unknown instead of the user
that I specify. I now it has to do with the SID and it probably is trying to
apply my local SID to all the other computers. I have not been able to get it
to work from within Access 2003. Help please.
 
On Tue, 13 Nov 2007 14:24:05 -0800, aCompuTech

Try invoking the command processor:
cmd.exe /c cacls <etc>

Another option is to use WinExec API rather than Shell. Not sure that
would make a big difference though.

-Tom.
 
Thanks Tom. I had tried the /c option before and I got the same result. I
looked into the WinExec but found nothing that can help me. The only place
where I saw how to get SID from a remote computer is when you use a server
but my workgroup has XP pro only. I am going to double check my network
settings because now some of the commands that used to work before in my
batch files are not working.
 
Back
Top