Page 1 of 1 1
Topic Options
#119967 - 2004-05-21 06:04 PM Copying Files into protected Directory
Discobolis Offline
Lurker

Registered: 2004-05-21
Posts: 3
Is there a way for me to copy files from a network resource to a local PC via a login script that will allow me to copy files to a directory that is protected? For example...The company I work for runs mutliple call centers. We are trying to protect our users by giving them minimum privleges to their PC's. However sometimes when we roll out new versions of software that are built in house we need to copy files from a network resource to their local PC. Everyone has read access to the network directory.

This is what I am currently trying to do:

If not exist(C:\SoftwareName\FileName)
use x: \delete
use x: \\servername\directory /USER: /PASSWORD:
copy x:\*.* c:\softwarename
copy x:\*.* c:\program files\directoryname
use x: \delete
endif

This might be way off base but some PLEASE let me know how to do this if it is possible to copy folders to a protected directory. As of right now the script I am trying to run doesn't error out but it doesn't copy anything either. I know how to do this ina a simple DOS batch script. I am trying to figure out how to do this with kixtart.

Thanks in advance for any replies.


Top
#119968 - 2004-05-21 06:40 PM Re: Copying Files into protected Directory
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
what about a MSI file...
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#119969 - 2004-05-21 07:14 PM Re: Copying Files into protected Directory
Discobolis Offline
Lurker

Registered: 2004-05-21
Posts: 3
Wouldn't I still need to run the MSI file with Admin privleges to install the files to that directory? The software we are trying to update is written in house or within our company.
Top
#119970 - 2004-05-21 07:16 PM Re: Copying Files into protected Directory
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
MSI's can be made to run elevated.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#119971 - 2004-05-21 07:33 PM Re: Copying Files into protected Directory
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Your script would not work anyway cuz you have no quotes.

You could always write an admin script that runs centrally reaching the computers over the network.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#119972 - 2004-05-21 07:43 PM Re: Copying Files into protected Directory
Discobolis Offline
Lurker

Registered: 2004-05-21
Posts: 3
We could run the script centrally however...not all the PC's are turned on all the time. The script would miss PC's....

I'll have to double check my syntax for the missing quotes.

Right now I am seeing two alternatives...Can anyone tell me if writing to a protected directory in the PC is possible or not with kixtart's copy function?

Top
#119973 - 2004-05-21 07:56 PM Re: Copying Files into protected Directory
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
if it could be done as simple as running a copy statement, we would have said that...

kix runs under the current user's security context... therefore you have to solve the security issue first.

MSI files can run elevated without any special scripting (which is what MS designed it for)

You can also use some RUNAS command... lots of examples in the FAQ as well as the reasons NOT to do it that way.
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#119974 - 2004-05-21 07:58 PM Re: Copying Files into protected Directory
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Quote:

The script would miss PC's



No kidding! That is why you would log the failures so that you can try again later.

KiX can only copy to a folder that the user who's security context it runs in has write access to. WHy would you expect any different?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#119975 - 2004-05-21 10:08 PM Re: Copying Files into protected Directory
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
Hi Discobolis

I'm not sure MSI files are quite as straight forward as it seems when it comes to running with elevated rights. You also need a program to create it with.

What you could do is have the pc write a log file to a central location during logon that contains the IP address of the computer. Then have another script that runs with Admin rights that checks that folder and reads the files. Then copies files to the remote computer and logs it to maybe like a .INI file if it succeeds so that you don't perform the copy multiple times.

Then have the Admin script delete the workstations log file.

Otherwise you will need to get into a much larger security issue with modify rights or other solutions.

If that is the method you think you can work with and you need further assistance with setting up that sort of a routine please let us know.

Top
Page 1 of 1 1


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

Who's Online
0 registered and 484 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.057 seconds in which 0.024 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