Page 1 of 1 1
Topic Options
#46811 - 2003-10-15 11:51 PM Copy file as administrator
sgrimes Offline
Lurker

Registered: 2003-10-06
Posts: 4
I need to distribute files to users' windows directories in WinXP. My problem is that the user does not have admin priveledges, and I am trying to avoid granting those rights. The distribution will take place from a logon script using kix, and would do a simple copy - the only problem is that it errors out, as the user cannot do that.

Is there a way for a script to perform duties as a network administrator?

Thanks

[ 15. October 2003, 23:51: Message edited by: sgrimes ]

Top
#46812 - 2003-10-16 12:07 AM Re: Copy file as administrator
Richie19Rich77 Offline
Seasoned Scripter
*****

Registered: 2002-08-16
Posts: 624
Loc: London, England
There are many posts on how to roll out scripts with admin rights, just do a search for "Admin Rights" or "Super User".
Top
#46813 - 2003-10-16 04:38 AM Re: Copy file as administrator
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
See the FAQ Forum or just do this from a domain admin account:
code:
$source='\\server\share\file.txt'
$dest='\c$\windows\system32\'
$comps=netview2()
for each $comp in $comps
copy $source '\\'+$comp+$dest
next

NetView2() is a UDF. Admin tasks should NEVER be done as part of a logon script.
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1471 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.053 seconds in which 0.026 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org