Hello Michael,
Thanks for your post. As I understand, you want to shadow copy the
executable file started by the main AppDomain. Please correct me if there
is any misunderstanding. Based on my experience, the executable file
started by main AppDomain remains locked during code execution and cannot
be shadow copyied. To work around the problem, I suggest that you can
create a stub app which in turns create a new AppDomain with setting
ShadowCopyFiles to true to start your executable file. Please refer to the
following code snippet:
'---------------------code snippet-------------------
Sub main()
' create a new evidence object,
' based on the current appdomain
Dim myDomainSetup = New System.AppDomainSetup()
myDomainSetup.ShadowCopyFiles = "true"
With AppDomain.CreateDomain( _
"sample", AppDomain.CurrentDomain.Evidence, _
myDomainSetup)
.ExecuteAssembly("MyExecutable.exe")
End With
End Sub
'---------------------------------end of------------------------------
Please feel free to let me know if you have any problems or concerns.
Have a nice day!
Regards,
HuangTM
Microsoft Online Partner Support
MCSE/MCSD
Get Secure! --
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.