DennisS Posted January 21, 2010 Share Posted January 21, 2010 We have a folder on a Windows server that all users can read from but only the TAP login name can create and write into. However, I want all users to have the ability to put new files into this folder (under a program's control). I'm trying to use RunAsWait(). I receive no errors when I use the following command but the file does not copy. However, each time I run the command, Task Manager shows a new "cmd" process running with the login SYSTEM. Task manager will not stop these processes and I must reboot to get rid of them. What am I doing wrong? Thanks RunAsWait("TAP","greatlakesind","Ct5gLe", 0, "cmd /c Copy J:\Kman\AA.PDF J:\Kman\LIN\XX.PDF","J:\Kman\LIN",@SW_HIDE) Link to comment Share on other sites More sharing options...
99ojo Posted January 21, 2010 Share Posted January 21, 2010 (edited) Hi, try: RunAsWait("TAP","greatlakesind","Ct5gLe", 0, @Comspec & " /c Copy J:\Kman\AA.PDF J:\Kman\LIN\XX.PDF","",@SW_HIDE) If fail, try for debugging to test access to mapped drive: RunAsWait("TAP","greatlakesind","Ct5gLe", 0, @Comspec & " /k dir J:\Kman\*.*") RunAsWait("TAP","greatlakesind","Ct5gLe", 0, @Comspec & " /k dir J:\Kman\LIN*.*") ;-)) Stefan Edited January 21, 2010 by 99ojo Link to comment Share on other sites More sharing options...
nergmlam Posted June 29, 2012 Share Posted June 29, 2012 HiTry to see if you get any errors in your commandline box:RunAsWait("TAP","greatlakesind","Ct5gLe", 0, @Comspec & " /K Copy J:KmanAA.PDF J:KmanLINXX.PDF","",@SW_MAXIMIZE) And please note the following.When using RunAs and RunAsWait you need to make sure, that the secondary logon service is running, and if you run your script from your own computer using e.g. pseexec.exe to get access to a remote computer, both computers must run the secondary logon service. And the secondary logon service needs the workstation service and netlogon service. The netlogon service only runs on domain computers, not on workgroup computers.You also needs to select a "@workingDir" for the functions, that the end user have write access to.SincerelyJorgen MalmgrenIT-ProgrammerDenmark - UTC+1www.tryware.dk;o) Your brain is like a parachute. It works best when it's armoros 1 Sincerely J. Malmgren IT-Programmer http://www.tryware.dk Link to comment Share on other sites More sharing options...
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