Solved

Robocopy as another user.

Posted on 2012-04-13
4
171 Views
Last Modified: 2012-05-07
I am trying to make an application or script to run robocopy as a server administrator in order to copy folder structures and keep the permissions intact.

I have tried various ways but with little to no success.

I have tried creating an application to start the program as a process, passing the username, password and domain, but this runs into an issue with multiple users not being able to run this application.  Robocopy just flashes for a moment and I cannot see the particular issue but it seems that it the username gets locked up to a single user.

I have tried just running the program with runas with the /netonly tags and it does seem to work, but in order to automate it i build an application to send the keystrokes to the console the issue arose that if the focus is shifted to another application it just sends the keystrokes to whatever is open.

A coworker suggested using windows script host but before i delve into that I guess I would like to ask if there is any way to get this running by any other means I have over looked.

to recap i need a program, process, script or whatever to copy a folder structure on a server to another location on the same server and preserve the permissions.
0
Comment
Question by:mjelec
  • 2
  • 2
4 Comments
 
LVL 6

Accepted Solution

by:
stavros41 earned 500 total points
ID: 37842795
Just run it from Task Scheduler, you can specify the user to run as.
0
 

Author Comment

by:mjelec
ID: 37843410
Could that be used to to add variable arguments?  For instance i need this to be run on demand and copy the template folders to a specified path.
0
 
LVL 6

Expert Comment

by:stavros41
ID: 37843471
I know you can do this with Windows 2008 yes, there is an add agruments box
0
 

Author Comment

by:mjelec
ID: 37844869
How would one do a variable in the arguments box?
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now