Re: No touch deployment
From: ALI-R (newbie_at_microsoft.com)
Date: 11/30/04
- Next message: ALI-R: "no touch deployment and reading a XML file"
- Previous message: Phil Wilson: "Re: Get the serial number"
- In reply to: Steve Bugden: "No touch deployment"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 29 Nov 2004 16:05:01 -0800
You'd better make a batch file like the one below and ask users to run it
before running your application.this is what most of the us do for now.
@rem - polchgprompt - Enables or disables the prompt that is displayed
@rem whenever Caspol.exe is run using an option that would cause policy
changes.
@rem - machine - specifies adding the new code group at machine policy
level.
@rem - addgroup - Adds a new code group to the code group hierarchy
@rem - url - Specifies code that originates from the given URL.
@rem - n - specifies the scripting name for a code group to add.
CD %windir%\microsoft.net\framework\v1.1.4322
caspol.exe -polchgprompt off -machine -addgroup All_Code -url
http://yourserver/yourapp/* FullTrust -n MagNetAlertVanSps02
caspol.exe -polchgprompt on
Pause
I will keep monitoring this thread,let me know if you need more help
Hope this helps.
Reza Alirezaei
"Steve Bugden" <SteveBugden@discussions.microsoft.com> wrote in message
news:4CB88BAB-72F6-42B8-AA5C-F28F0EA57FDA@microsoft.com...
> Hi,
>
> I have deployed a .net application of across the web, using standard code
> (attached). THis works except that I have to give trust to the 7 dlls in
my
> application individually using the .Net Framework 'trust an assembly'
wizard.
> I can't expect my users to do that.
>
> Firstly, I would like to be able to present the user with a messagebox in
> which he clicks OK to trust my assemblies.
>
> As a second step, I would like to be able to detect for the presence of
the
> .Net Framework and allow the user to install it.
>
> Can anyone please point me to a good resource which would explain what I
> want to do. I just have't managed to find anything that really explains it
> well.
>
> Many Thanks,
>
> Steve Bugden
>
> Imports System.Reflection
>
> Public Class Form1
> Inherits System.Windows.Forms.Form
>
> Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
>
> Try
>
> strmsg = "http://someurlname/somedllname.dll"
>
>
> 'Register an event to determine the assembly, if not found ie when
using
> deep serialisation
>
> Dim currentdomain As AppDomain = AppDomain.CurrentDomain
>
> 'Event to catch error during deep serialisation
> AddHandler currentdomain.assemblyresolve, AddressOf
MyResolveEventHandler
>
> Dim strFormTOLoad As String
> strFormTOLoad = "Appname.MainFormName"
>
> Dim objStartAssenbly As [Assembly] = [Assembly].LoadFrom(strMsg)
>
> Dim FormType As Type = objStartAssenbly.GetType(strFormTOLoad)
>
> Dim objStartForm As Object
>
> objStartForm = Activator.CreateInstance(FormType)
>
> Dim form2 As Form = CType(objStartForm, Form)
> Me.Hide()
> form2.ShowDialog()
> Application.Exit()
>
> Catch ex As Exception
>
> MsgBox(ex.Message & ControlChars.CrLf & ControlChars.CrLf &
> ex.StackTrace)
> End Try
> End Sub
>
> Private Shared Function MyResolveEventHandler(ByVal sender As Object,
ByVal
> args As ResolveEventArgs) As [Assembly]
>
> 'Get a list of all the assemblies loaded in our appdomain
> Dim assemblies() As [Assembly] = AppDomain.CurrentDomain.GetAssemblies
>
> 'Search the list to find the assembly that was not found
> Dim asm As [Assembly]
>
> For Each asm In assemblies
> If asm.FullName = args.Name Then
> Return asm
> End If
> Next
> End Function
>
> End Class
- Next message: ALI-R: "no touch deployment and reading a XML file"
- Previous message: Phil Wilson: "Re: Get the serial number"
- In reply to: Steve Bugden: "No touch deployment"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|