How to read and write A FAT in WinXP [duplicate] - tasm

This question already has answers here:
int 13h in windows protected mode?
(4 answers)
Closed 8 years ago.
I am trying to read the FAT using Int 13H of but its Failing as I run the program. It flashes a message "Access Denied " though I am working in the Administration Domain Can any one answer me the reason and solution for it
Thanking You
Gaurav

Use the CreateFile API for Win32 as detailed in this article:
http://support.microsoft.com/kb/100027
Note in Windows Vista direct disk access is restricted further:
http://msdn.microsoft.com/en-us/library/aa363858%28VS.85%29.aspx

Related

What version is Windows, really? [duplicate]

This question already has answers here:
How to detect true Windows version?
(9 answers)
Closed 7 years ago.
It appears that the version info functions in the Win32 API that I know and love have changed their behavior. GetVersionEx now return what the program's manifest is set for, not the actual version.
The new function IsWindows10OrGreater seems pointless since it is only available on windows 10 or greater, so if the program includes it and successfully links it will always return TRUE.
But, in an installer or similar program, how does it determine whether the current environment really is Windows 10 or greater? It needs this to know what to download or which options to set up for other programs.
Your premise is false. The IsWindows10OrGreater function is a macro, so provided you are using a suitably recent version of the SDK the compiled program will work on all currently supported versions of Windows. (As well as Windows XP and I think even Windows 2000.)
(Of course, this mistake is understandable, since the documentation is wrong.)
Note that the program's manifest must still indicate that it supports Windows 10 in order for the macro to work.

Windows Assembly Hello World [duplicate]

This question already has answers here:
How to write hello world in assembly under Windows?
(9 answers)
Closed 8 years ago.
The little time I became interested in atraz assembly. Nasm first started with Linux ... I did some basic stuff, but wanted to do in Windows. Hence googled a bit and saw some things for Dos. But depended on emulators. I want to program for Windows 8 64-bit Intel, but everything I search for Windows redirects to Dos ...
In linux to do is interrupt int 80h, int 21h in Dos, Windows I have no idea how to get a code!
One Hello World and an assembler has helped ...
You might want to take a look at this tutorial.
include '%fasminc%/win32ax.inc'
.code
start:
invoke MessageBox,HWND_DESKTOP,"Hello World!","Win32 Assembly",MB_OK
invoke ExitProcess,0
.end start

setting the home directory in windows R [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Change path.expand location (Win 7)
I would like to change the directory that path.expand("~/") references on a windows system. Currently this goes to "C:/Users/home/Documents/" by default. How does one change this? Note that this is distinct from the working directory that is set with setwd()
You can change this by adding an R_USER variable to your Rprofile.site file.
Sys.setenv(R_USER="/my/desired/path/to/tilde")
This does not work on linux systems. See a related question: How to reset path.expand on tilde

How does a program know it's launched from xcode? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Detecting if iOS app is run in debugger
I want to add some special handling code when my program is launched from Xcode Debugger (vs. directly launched from simulator or from device). When Xcode launches a program to debug, will it set an enviroment variable?
Simplest approach is to edit your debug scheme to pass a command line type argument, and detect it in main().

How do I periodically check if a program is running in Windows? [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
How to check if a process is running via a batch script
I've heard of batch scripts, but couldn't find any official documentation on it. Is this possible with batch scripts?
Also, can it send emails?
EDIT: Basically I need to check if a certain application is running, and send an email if it isn't as a notification. Can this be done via batch scripts?
You can use the PsList from Sysinternals to find out what is there:
http://technet.microsoft.com/en-us/sysinternals/bb896682
and then kill it with PsKill:
http://technet.microsoft.com/en-us/sysinternals/bb896683

Resources