|
Michael Dunn wrote:
Ericahist
More erica pics!
Time to add my collection!
Michael Dunn wrote:
scanreg /opt
that's awesome!
The kindest thing you can do for a stupid person, and for the gene pool, is to let him expire of his own dumb choices.
[Roger Wright on stupid people]
We're like private member functions
[John Theal on R&D]
We're figuring out the parent thing as we go though. Kinda like setting up Linux for the first time ya' know...
[Nitron]
|
|
|
|
|
Atlantys wrote:
More erica pics!
I know, I'm behind... I actualy watched the Sept. MSDN show (first time I've done that in ages, the tablet PC stuff was neato-keen) but I haven't gone thru Erica's segments looking for nice stills to post.
--Mike--
Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber
Actual sign at the laundromat I go to: "No tinting or dying."
|
|
|
|
|
Michael Dunn wrote:
I haven't gone thru Erica's segments looking for nice stills to post.
Chop-chop! time's a-wasting!
She's got to lose the headband though (the few pics, in the bright blue). It just looks.. so 1970s (ie: the dinosaur era) to me (like the mom from "The Wonder Years").
The first one and the TechEd2003 ones are my favs.
Michael Dunn wrote:
tablet PC
another item to add to the "want, but will never afford" list.
The kindest thing you can do for a stupid person, and for the gene pool, is to let him expire of his own dumb choices.
[Roger Wright on stupid people]
We're like private member functions
[John Theal on R&D]
We're figuring out the parent thing as we go though. Kinda like setting up Linux for the first time ya' know...
[Nitron]
|
|
|
|
|
Atlantys wrote:
She's got to lose the headband though (the few pics, in the bright blue). It just looks.. so 1970s
I thought she was going for the Carol Brady look, myself. I don't think it would work on anyone else, but I like it on her.
--Mike--
Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber
There is a saying in statistics that a million monkeys pounding on typewriters would eventually create a work of Shakespeare. Thanks to the Internet, we now know that this is not true.
|
|
|
|
|
Simple question, I hope. I need to write a console app that will return a string, either as a value of modifying a value in the environment (like Path). How can I return a string value that can be used by the next step in a logon script?
Thanks,
Leo T. Smith
|
|
|
|
|
Have a look at the Get/SetEnvironmenVariable(s) in winbase.
Note diff between it and stdlib get/putenv:
<snip>
"The GetEnvironmentVariables function retrieves the environment variables for the current process"
... "getenv and _putenv use the copy of the environment pointed to by the global variable _environ to access the environment. getenv operates only on the data structures accessible to the run-time library and not on the environment "segment" created for the process by the operating system..."
</snip>
So there may be issues - i.e. if you need this var to persist past the curren login. Also, if I read this correctly, you can create new (local env)vars with SetEnvironmentVariable(), but not with putenv().
|
|
|
|
|
Sadly this will not work. SetEnvironmentVariable() changes the environment for the current process, not the parent process. Such changes will be passed to processes that you then launch, but not to 'sibling' processes that will be launched after your process has completed.
Writing to standard output and then having the script read that is your only real option.
--
-Blake (com/bcdev/blake)
|
|
|
|
|
Hmmm - right, my bad.
Ok - I've got it - we write a device driver that can map kernel ram into the user mode address spaces of multiple clients. An IOCLTL to the driver updates all buffers, and presto...
|
|
|
|
|
*grins broadly* Nah, it isn't nearly that bad...
You can do it all from user mode if you are careful:
#pragma comment(lib, "ntdll.lib")
typedef struct _PROCESS_PARAMETERS
{
ULONG AllocationSize;
ULONG ActualSize;
ULONG Flags;
ULONG Unknown1;
UNICODE_STRING Unknown2;
HANDLE InputHandle;
HANDLE OutputHandle;
HANDLE ErrorHandle;
UNICODE_STRING CurrentDirectory;
HANDLE CurrentDirectoryHandle;
UNICODE_STRING SearchPaths;
UNICODE_STRING ApplicationName;
UNICODE_STRING CommandLine;
PVOID EnvironmentBlock;
ULONG Unknown[9];
UNICODE_STRING Unknown3;
UNICODE_STRING Unknown4;
UNICODE_STRING Unknown5;
UNICODE_STRING Unknown6;
} PROCESS_PARAMETERS, *PPROCESS_PARAMETERS;
typedef struct _PEB
{
ULONG AllocationSize;
ULONG Unknown1;
HINSTANCE ProcessHinstance;
PVOID ListDlls;
PPROCESS_PARAMETERS ProcessParameters;
ULONG Unknown2;
HANDLE Heap;
} PEB, *PPEB;
typedef struct _PROCESS_BASIC_INFORMATION {
DWORD ExitStatus;
PPEB PebBaseAddress;
ULONG_PTR AffinityMask;
LONG BasePriority;
ULONG_PTR UniqueProcessId;
ULONG_PTR InheritedFromUniqueProcessId;
} PROCESS_BASIC_INFORMATION;
extern "C" __declspec(dllimport) DWORD __stdcall
NtQuerySystemInformation(
SYSTEMINFOCLASS SystemInformationClass,
PVOID SystemInformation,
ULONG SystemInformationLength,
PULONG ReturnLength
);
extern "C" __declspec(dllimport) DWORD __stdcall
NtQueryInformationProcess(
HANDLE ProcessHandle,
PROCESSINFOCLASS ProcessInformationClass,
PVOID ProcessInformation,
ULONG ProcessInformationLength,
PULONG ReturnLength
);
Combine the above with your typical CreateRemoteThread/etc injection hacks and bash on your parent's environment happily. Not exactly documented or anything, but hey.
(The hacked together definitions above are leftovers from a round of frustration some years ago when I concluded the only documented way to get your parent's process ID was via the abomination that is WMI. That InheritedFromUniqueProcessId member above is the parent process ID.)
--
-Blake (com/bcdev/blake)
|
|
|
|
|
This could be the start of an interesting kerna/el mode thread...
I'd also like to invent a PsSetJustDumpedThisModuleNotify() hack.
And what is a Lego anyway?
But...
Leo - if you're still with us... could you post a couple more details on how your procs interact - IPC doesn't have to be this scary. Really!
right - weekend looms - excuse me if I'm scarce...
Luckily, this is the OSSA forum, which has nothing to do with the increasingly ubiquitous desire to obtain a limited edition Bobble Head Bob, and our thread won't scroll off into the COMpost heap for a few days :P
|
|
|
|
|
This is going to sound insane, I know
Get your console app to write a batch file which contains only a SET statement. From the logon script, run the batch file that the console app just wrote (using CALL ). Your environment should now contain the value of the string.
|
|
|
|
|
Hi,
Can I restore the following . if yes then how.
1. a single public folder (Outlook)
2. calendar (Outlook)
3. address book (Outlook)
4. client configuration (outlook)
Also, can i take a backup from the M: drive created when I installed Exchange server..B'cause it contains the same data of exchange Server..
Thanks in advance
The chosen One
|
|
|
|
|
|
Thanks Mike for the info. Do u know any other link 4 taking back up for
1. a single public folder (Outlook)
2. calendar (Outlook)
3. address book (Outlook)
4. client configuration (outlook)
The chosen One
|
|
|
|
|
I want to draw object like drawing mouse cursor.
Explanation.
Window and button and etc object is drawn by GDI of system.
We can control and draw All window and Desktop.
And We can control mousecursor by SetCursor().
But I can't draw object like mouse cursor.
For example,,
I want to draw a nonmoving triangle like mouse cursor.
Can we control the above by GDI32 api ?
Please tell me.
|
|
|
|
|
LoadImage followed by DrawIconEx , I think.
|
|
|
|
|
Thank you for the reply.
I think that your method draws icon a part of window.
We can draw alike mouse cursor.But I can't draw mouse cursor.
for example,
When We push print-screen key ,We can't see mouse cursor in captured screen.
I think it is deep than GDI32.
By what method do system draw mouse cursor,too?
please tell me...
|
|
|
|
|
How do you delete Windows event log files? I wrote a simple app that log events to a user specified log (ie. not system/application/security, but one that I created)..
I tried delete after disabling Events Services. But after restart, Windows restore the log files.
Anyone?
|
|
|
|
|
Whenever I map a drive by the "Map Network Drive" option
something goes wrong. The name of this drive appears in
blank, and the window with its folders is not opened. There
are, also, problems if I try to copy something to / from
this mapped drive (RAW file system).
This problem is over when the windows explorer is re-opened.
I know this is a old problem, but I still didn't found the
solution. The MSDN article doesn't work (KB817861). Anybody
can help me?
Thakns,
Moises.
|
|
|
|
|
Does anybody know of any docs on the cmd.exe shell? Official (MS) as well as non-official.
--
Stukas! Stukas im Visier!
|
|
|
|
|
|
That doesn't give me much on the actual script language. Mostly cmd.exe switches and how to enable completion.
--
Stukas! Stukas im Visier!
|
|
|
|
|
Sorry, I thought it did - I guess I only skim-read it
Just typing help lists the commands that the help program knows about. Of course help knows about itself:
C:\>help help
Provides help information for Windows XP commands.
HELP [command]
command - displays help information on that command. You probably want to look at least at help if and help goto .
|
|
|
|
|
And help for , help call and help exit as well. It's actually a surprisingly capable little language these days. Here's the contents of the which.cmd file in my tools path:
@echo off
setlocal enableextensions
if "%1" == "" (
echo usage: which ^<command^>
exit /b 1
)
if "%~x1" == "" (
call :pathext %1 %PATHEXT%
) else (
call :search %1
)
if %ERRORLEVEL% neq 0 echo %1 not found.
exit /b %ERRORLEVEL%
:pathext
:loop
call :search %1%2
if %ERRORLEVEL% equ 0 exit /b 0
shift /2
if not "%2" == "" goto loop
exit /b 1
:search
if not "%~f$PATH:1" == "" (
echo %~f$PATH:1
exit /b 0
) else (
exit /b 1
)
--
-Blake (com/bcdev/blake)
|
|
|
|
|
Ah yes, I see from help call that the parameter syntax has been extended to support different parameter expansions, and also to allow essentially a subroutine call into the same batch file.
Cunning use of the %PATHEXT% variable, there.
I must copy this to my Windows 2000 computer - the Platform SDK's where now requires Windows XP.
|
|
|
|