Solved

Run As Execution

Posted on 2006-06-12
2
215 Views
Last Modified: 2010-04-16
I have an application with which I am going to be coding some .NET 2.0 usage.  My problem is the way my network is currently set up.  Of course I need to have the 2.0 runtime installed on every machine that the application will run on, so that is where my problem is.  Right now, my network is set up as follows.

All machines have hard coded ip address.
Users do not have rights to install.
Members of a domain which I am administrator to.

My question is how can I automate the install of the 2.0 runtime.  I thought about having my application initiate the install, but the users do not have admin rights.  Is there any way that the application can run an executable with admin rights, sort of like the "run as" option you get when left clicking some executables.  Any suggestions would be appreciated.

Thanks,
Kendal
0
Comment
Question by:gvector1
2 Comments
 
LVL 11

Accepted Solution

by:
Expert1701 earned 300 total points
ID: 16887021
If your domain is using Active Directory (Windows Server 2000, or 2003), you can use the following technique:

  Deploying the .NET Framework 2.0 Using Active Directory (Windows 2000 Server)
  http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetdep/html/ndp2_dplad.asp
0
 
LVL 18

Assisted Solution

by:Ravi Singh
Ravi Singh earned 200 total points
ID: 16888313
Hi, you can make a Win API call to the CreateProcessWithLogonW function (RunAs uses the same function). It'll run the specified executable under the domain/username/password specified. There's a C# wrapper class for it here:

http://www.thecodeproject.com/csharp/RunAs.asp
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

773 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