I am facing a certain problem. I am trying to delete a certain file programmatically that resides in the system32 folder (malicious file). When i try to delete it using the kill statement an error message shows that says Access Denied as the file is being used by another process. When i searched i found out the that winlogon.exe uses this executable. How can i remove this handle programmatically. Any ideas and suggestions would be very helpful.
WinLogon cannot be unloaded, and you cannot unload anything that's being referenced by it. You could have Windows remove the file "after" a reboot (it does this before it starts the shell, meaning that WinLogon will not yet be in use)
That's not recommendable though; the infected file will have replaced the original, and deleting it will corrupt your system. Unless you can put back a file that's not infected, best idea is to not touch it.
No, just a new malicious file has been created in the windows/system32 folder.When i try to delete that file it shows file in use . and this file is being used by the winlogon.exe process. how can i delete this file programmatically.
Files can only be deleted when they're not in use, and you can only remove it after a reboot and before logon, as described before. (Simple explanation, I cannot throw away your mug if you're still drinking from it, since it's in use)
WinLogon does not load random files. If the file is in use, it counts as a dependency. If WinLogon is started without the dependency, it will simply fail.
"Old" file's would be "corrected" by putting back a copy from a previous restore-point, or by copying back the original file from the setup.
I suppose there may be another way to achieve this, but ....
If the information to be displayed on the Startup Form is to remain static (ie not changing) may I suggest using an image transition effect to achieve your "Start Up Fade".
First create a graphic of your "startup page information" which will be displayed in a picturebox control.
Then I would add a new winform or splash to your project, set FormBorderStyle to None, add a PictureBox the size of the form that will load the page graphic (Startup Image) you created, then when the new form loads on application start, call the image transition effect, cycle through the fade in, small delay then fade out then close the window.
I believe the CodeProject has a project that demonstrates how to implement a simple trasition on images in vb.net which could be used to create the fade in fade out process.
Look for "splash screen".
By the way, you should check whether your application is running in some kind of remote session (RDP, Citrix): in such a case, do not use fade-in fade-out effects as that will cause large network traffic.
finally yes it's work how can I say thank you for your help .. but you know what you are my super hero who save my time after two days of stupid attempts went fail. oh my God why I didn't ask you from the first day i got this problem, I have a project and this project depends on this code otherwise I will stop work on this project after I faced this problem but now I'm very excited to back work on my project
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
My Windows forms application sends and receives SOAP messages from/to an https server. Messages with simple and complex results work fine. Still one request that I issue and I don't know how to handle its response.
The response that I don't know to to use - in order to download a document - is as follows:
But I don't know how should I handle that CID: (Content-id)
Below is the code that sends the request and receives the response:
PrivateFunction SendRequest(ByVal EnvelopContents AsString, ByVal ServiceName AsString, ByVal FullPathURL AsString) AsBooleanDim myWebRequest As HttpWebRequest = HttpWebRequest.Create(FullPathURL)
'Set Envelop ParametersDim encoding AsNew ASCIIEncoding()
Dim byte1 AsByte() = encoding.GetBytes(EnvelopContents)
.Method = "POST"' Set the 'ContentType' property of the WebRequest.
.ContentType = "text/xml"' Set the 'ContentLength' property of the WebRequest.
.ContentLength = EnvelopContents.Length
'authentication sectionDim Certificato As X509Certificate = SelCert()
.PreAuthenticate = True
EndWithTryDim newStream As Stream = myWebRequest.GetRequestStream()
newStream.Write(byte1, 0, byte1.Length)
' Close the Stream object.
' Assign the response object of 'WebRequest' to a 'WebResponse' variable.Using myWebResponse As WebResponse = myWebRequest.GetResponse()
'' success in hereDim dataStream As Stream = myWebResponse.GetResponseStream()
' Open the stream using a StreamReader for easy access.Dim reader AsNew StreamReader(dataStream)
' Read the content.Dim responseFromServer AsString = reader.ReadToEnd()
'' deal with responseReturnTrueEndUsingCatch ex As WebException
'deal with exception EndTryEndFunction