Jump to content

Recommended Posts

Posted

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)

Posted (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 by 99ojo
  • 2 years later...
Posted

Hi

Try 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.

Sincerely

Jorgen Malmgren

IT-Programmer

Denmark - UTC+1

www.tryware.dk

;o) Your brain is like a parachute. It works best when it's

Sincerely

J. Malmgren

IT-Programmer

http://www.tryware.dk

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...