473,785 Members | 2,419 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

The process cannot access the file 'D:\pagefile.sy s'

22 New Member
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!!!!!!!!!!! !!!!!!!!!!!!!!! !!!!!!!
Expand|Select|Wrap|Line Numbers
  1.  
  2. Imports System.io
  3. Module Module1
  4.  
  5. Sub Main()
  6. Dim fs As FileStream
  7. fs = New FileStream("D:\Documents and Settings\Administrator\Desktop\SCAN%20HDDDDDDDDDDDDDDDD[1].doc", FileMode.Open, FileAccess.ReadWrite, FileShare.Read)
  8. Dim d As New StreamReader(fs)
  9.  
  10. d.BaseStream.Seek(0, SeekOrigin.Begin)
  11.  
  12. While d.Peek() > -1
  13. Console.WriteLine(d.ReadToEnd)
  14. Console.ReadLine()
  15. End While
  16. d.Close()
  17.  
  18.  
  19. End Sub
  20.  
  21. End Module
  22.  
Jun 17 '08 #1
3 3944
Curtis Rutland
3,256 Recognized Expert Specialist
Well, for one thing you shouldn't try to use ReadWrite access to it.
Jun 17 '08 #2
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?
Jun 17 '08 #3
Curtis Rutland
3,256 Recognized Expert Specialist
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.
Jun 17 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
2771
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:')
9
715
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
0
1529
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:...
2
18057
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 :
43
2239
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!!!!!!!!! ...
10
3006
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. ...
8
6521
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...
1
6757
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:
1
9085
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")
0
10357
Oralloy
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...
0
10162
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9959
tracyyun
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...
0
8988
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6744
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();...
0
5396
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...
0
5528
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2893
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.