[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Robocopy as another user.

Posted on 2012-04-13
4
Medium Priority
?
182 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 6

Accepted Solution

by:
stavros41 earned 2000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
Progress
Starting up a Project

650 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