Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Copying protected files with vbscript

198 views
Skip to first unread message

Tim Payne

unread,
Jan 16, 2003, 1:39:41 AM1/16/03
to
Hi there. Here is the problem.
We are running a NT domain as well as Novell.
Our clients are W2K and W9X. Due to a change in our IP addressing scheme we
need to push a new hosts and lmhosts file. No problem with win9x. With W2k
you need administrative rights to copy the files on to the local machine. I
would like to copy the files during the login process. Is there a way in a
script l can copy the files with administrative privileges when a standard
user is on the local machine.

Thanks in advance.
Man will l be happy when we got to AD.

Tim Payne


spag

unread,
Jan 16, 2003, 4:10:12 AM1/16/03
to

"Tim Payne" <tlp...@telusplanet.net> wrote in message
news:u89$ToSvCHA.2668@TK2MSFTNGP09...

> Hi there. Here is the problem.
> We are running a NT domain as well as Novell.
> Our clients are W2K and W9X. Due to a change in our IP addressing scheme
we
> need to push a new hosts and lmhosts file. No problem with win9x. With W2k
> you need administrative rights to copy the files on to the local machine.
I
> would like to copy the files during the login process. Is there a way in a
> script l can copy the files with administrative privileges when a standard
> user is on the local machine.

I use the sfImpersonator object to switch over to an administrative account
for that task. I found it at
http://cwashington.netreach.net/main/tools/default.asp?topic=n-z (just
scroll down it's there). It's very simple to use but make sure you encrypt
the files so that sneaky people don't see the administrative account
password!

Torgeir Bakken (MVP)

unread,
Jan 16, 2003, 4:48:42 PM1/16/03
to
spag wrote:

Hi

But you will need administrative rights to register this DLL on the local
computer, so this is a Catch-22 situation...


Also note that you need to give the users the permission "Act as part of the
operating system" as well:

Subject: Required privilege using SFImpersonator.dll
Newsgroups: microsoft.public.scripting.wsh
Date: 2002-02-23 12:20:28 PST
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&th=b86bc57db23b0293


--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and a ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter


Torgeir Bakken (MVP)

unread,
Jan 16, 2003, 4:50:11 PM1/16/03
to
Tim Payne wrote:

> Hi there. Here is the problem.
> We are running a NT domain as well as Novell.
> Our clients are W2K and W9X. Due to a change in our IP addressing scheme we
> need to push a new hosts and lmhosts file. No problem with win9x. With W2k
> you need administrative rights to copy the files on to the local machine. I
> would like to copy the files during the login process. Is there a way in a
> script l can copy the files with administrative privileges when a standard
> user is on the local machine.

Hi

An option is to use a RunAs-solution that can run a process as another user
(e.g. the administrator).

Some 3rd party RunAs solution that "hides" username/password (buy solutions) are

listed below. Can be run from network shares, so nothing needs to be installed
on the client computers.

1)
TqcRunAs for Win2k (NTsu for NT4) from Quimeras
http://www.quimeras.com/

TqcRunas can read it's command line that includes
the password from an encrypted file.


2)
NetExec at http://www.netexec.de/
It is a runas/su replacement with much more features. Using the
CustomClient-Creator part you can create your own .exe files that run
a specific command line as another user, while storing the password
encrypted inside the .exe.


3)
RunAs Professional Version 2.x.x
http://www.mast-computer.de

0 new messages