I m Using the Foll. method to Read the Contents of a File. If i m reading the doc,txt prog is working file. I m using the File "D:\pagefile.sy s", ERROR is there,The process cannot access the file 'D:\pagefile.sy s' because it is being used by another process.
how To Read Contents of "D:\pagefile.sy s".
Need UR Help!!!!!!!!!!! !!!!!!!!!!!!!!! !!!!!!! -
-
Imports System.io
-
Module Module1
-
-
Sub Main()
-
Dim fs As FileStream
-
fs = New FileStream("D:\Documents and Settings\Administrator\Desktop\SCAN%20HDDDDDDDDDDDDDDDD[1].doc", FileMode.Open, FileAccess.ReadWrite, FileShare.Read)
-
Dim d As New StreamReader(fs)
-
-
d.BaseStream.Seek(0, SeekOrigin.Begin)
-
-
While d.Peek() > -1
-
Console.WriteLine(d.ReadToEnd)
-
Console.ReadLine()
-
End While
-
d.Close()
-
-
-
End Sub
-
-
End Module
-
3 3946
Well, for one thing you shouldn't try to use ReadWrite access to it.
Plater 7,872
Recognized Expert Expert
PageFile.sys is a system file. It is IN USE and i believe it will lock it against writing AND reading.
I see no pivital reason for you to need access to the file?
PageFile.sys is a system file. It is IN USE and i believe it will lock it against writing AND reading.
I see no pivital reason for you to need access to the file?
Yeah, that's what I thought too. I didn't want to say it without trying, and I didn't want to try right now.
But I'm pretty sure that you can't get into one of the locked system files while the OS is running, except maybe in safe mode. And even in safe mode, you shouldn't be able to get into the pagefile.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Ron |
last post by:
I've written a screen saver which opens multiple copies on windows 98.
I'm trying to check the process list to determine if it is already running.
So far all the example win32 routines I've found, through google, only
work on newer xp and nt versions of windows. This is the current attempt
to get the process list on windows 98:
def GetProcessNameList():
from win32com.client import GetObject
WMI = GetObject('winmgmts:')
|
by: Paul |
last post by:
Hi,
VB.NET is saying the file I am creating is in use by another process and
won't complete its task of moving the file to the specified destination
folder.
Here is my code (the main bit anyway)....
Private Sub LogChange(ByVal source As Object, ByVal e As
System.IO.FileSystemEventArgs)
If e.ChangeType = WatcherChangeTypes.Created Then
|
by: Zed |
last post by:
I have a problem with .net writing to a remote server that I need to deploy
on. The app works fine on my local machine. But when got access to the
server I went to VS.NET and tried to create a project the regular way, I got
this message "The web was created successfully, but an error occurred when
trying to configure the application root for this web. Web projects may not
operate correctly without application root. The returned error was:...
|
by: Cédric Rossé |
last post by:
Hello,
I'm currently developping a web application and I'm trying to execute a
batch file (.cmd) on the server side when the client presses a button on a
web page.
When I do this on my local machine (where I'm developping my application),
no problem occurs. But when I put the web application on my Windows server
2003 server, I always get the following error message. Can someone help me ?
Here is the config of my webconfig file :
|
by: ZillionDollarSadist |
last post by:
Hello,
I'm working at a simple Access '97 + VB4 application, and I ran into a
terrible problem: something I never modified now gives me a totally
unwanted "Invalid use of null" error.
It happens in a Text.LostFocus event, this block:
Do While Not TB6.EOF
If Year(TB6(0)) = Val(Trim(Text1.Text)) Then
!!!!!!!!!!!!!Here!!!!!!!!!
...
| |
by: I. Myself |
last post by:
Suppose we spawn a child process with Popen. I'm thinking of an
executable file, like a compiled C program.
Suppose it is supposed to run for one minute, but it just keeps going
and going. Does Python have any way to kill it?
This is not hypothetical; I'm doing it now, and it's working pretty
well, but I would like to be able to handle this run-on condition. I'm
using Windows 2000, but I want my program to be portable to linux.
...
|
by: cypher543 |
last post by:
This has been driving me insane for the last hour or so. I have search
everywhere, and nothing works. I am trying to use the subprocess module
to run a program and get its output line by line. But, it always waits
for the process to terminate and then return the output all at once.
Can someone please show me some code that actually works for this sort
of thing? It doesn't even have to use the subprocess module. Don't
worry if the code...
|
by: Adam Atlas |
last post by:
What is the best way for a Python process (presumed to be a script run
by the interpreter binary, not embedded in some other program) to
restart itself? This is what I've been trying:
import __main__
for path in sys.path:
path += '/' + __main__.__file__
if os.access(path, os.F_OK): break
else:
|
by: tanya.wang |
last post by:
I want to access files from a remote server so I mapped it in my
server under z:\ for \\myserver\web\mysite\images\
I added this UNC path to my IIS virtual directory and name it as
"upload"
but I still cannot use any FSO to read it. Here is my code:
<%
Dim fs
set fs=Server.CreateObject("Scripting.FileSystemObject")
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |