Page 1 of 1 1
Topic Options
#46393 - 2003-10-07 01:21 PM Run program as administrator
andysk Offline
Fresh Scripter

Registered: 2003-09-18
Posts: 14
Hi,
Anybody know how to run a program as administrator (or other users) programmatically.
I tried to apply auto antivirus update everytime users login. Some users gave us some example on how to apply auto update at Kix. But still i can't find an example on how to run an update exe file as administrator (since some files requires administrator priviledge). In Windows XP and 2000, they have the shortcut "Run as", so i think it must be a way to do it programmtically.

Thanks

Top
#46394 - 2003-10-07 01:31 PM Re: Run program as administrator
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
nope, runas can't be scripted.
but, you could search the board for runas and get zillion examples.
there should be some stuff for runas in our faq too.
_________________________
!

download KiXnet

Top
#46395 - 2003-10-07 01:35 PM Re: Run program as administrator
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1342
Loc: NL
Also SU.exe
_________________________
Co


Top
#46396 - 2003-10-07 01:58 PM Re: Run program as administrator
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Here are a number of methods used to install an application as an Admin -

Installing an Application as an Admin

Also, did you get a chance to look at our KiXtart FAQ & How to's Section? There are a number of topics here that have been addressed a number of times before. [Wink]

HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#46397 - 2003-10-08 07:45 AM Re: Run program as administrator
andysk Offline
Fresh Scripter

Registered: 2003-09-18
Posts: 14
I tried to avoid another utility again (especially that require us to install it first before use, means, we have to install it first manually as administrator) unless has been included in Windows.
Runas seems the best option, but it require us to enter password manually.

Top
#46398 - 2003-10-08 08:43 AM Re: Run program as administrator
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
In the link I provided above, there are a number of ways to achieve this. Probably the simplest is to use a Task Scheduler to run this process under the appropriate context.

Look for and at posts with regard to JT.EXE.

Kent

[ 08. October 2003, 08:43: Message edited by: kdyer ]
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#46399 - 2003-10-08 10:16 AM Re: Run program as administrator
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Andysk,

read the FAQ mentioned by Kent and take a look at the link provided in option 2.

There you'll find that runas can be scripted...
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#46400 - 2003-10-09 07:07 AM Re: Run program as administrator
andysk Offline
Fresh Scripter

Registered: 2003-09-18
Posts: 14
OK. Thanks for your help. I will try it.
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 1452 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.065 seconds in which 0.03 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