I have a simple question I guess,
but I just can't figure it out.
How do I make a custom doskey macro system wide available with Win2k
cmd.exe. If I open up a cmd shell, and declare a macro, it works
fine, but if I open another shell ... the macro is not available in
this new shell.
This is different behaviour than in Win9x dos (what a surprise).
Oh yes, I don't want to work with shortcuts or pifs or whatever, just
a nice clean dos solution is what I'm looking for ;-)
Thnx,
Gert
I've found the solution,
and I'm posting it for anyone who wants to know.
first create a batch with the doskey macros in 'm,
than create a registry key REG_SZ in
"HKEY_CURRENT_USER\Software\Microsoft\Command
Processor" (or LOCAL_MACHINE, whatever flavour you prefer) called
"AutoRun", and add as value the path and filename of the batch you
just created. Now this batch will be executed every time an instance
of cmd.exe is started.
NOT thanks to Micro$oft ! :p
Cya,
Gert
--
Ritchie
Undo address for email.
"Djeezus" <gert.va...@medisearch-int.com> wrote in message news:pa9jiu44tt760u14q...@4ax.com...
thnx for the tip, but I need to make sure that the users won't be able
to turn this "feature" off. The macros contain some essential
aliases. (net=echo Permission denied)
Is there like any other (better) way that u know of, to sort of give
the impression that certain commands are disabled ? I've always used
doskey macros, and they were always efficient, but not 100% secure.
Cya,
Gert
^ Is there like any other (better) way that u know of, to sort of give
^ the impression that certain commands are disabled ?
You could copy everything in "%SystemRoot%\system32" (and other
directories) that they can have access to into a "%SystemRoot%\bin", place
"%SystemRoot%\bin" in their path, and deny them access to
"%SystemRoot%\system32" (and the other directories).
Frank
I don't think it matters what you do, unless you can somehow ensure that
none of the users know how to:
- determine what doskey macros are in effect (doskey /macros), and:
delete them (doskey net=)
- specify the prohibitted executable with a path (C:\winnt\system32\net)
> Is there like any other (better) way that u know of, to sort of give
> the impression that certain commands are disabled ? I've always used
> doskey macros, and they were always efficient, but not 100% secure.
IMHO, giving "the impression" of security and actually having it are two
completely different things. And further, "the impression" will make you
look very bad when it is found out as such.
As Frank suggests, I would look to NTFS file permissions for what you want.
/Al
The logon script executes all these "net" commands, and as far as I
know, the logon script executes under the account of the person that
logs on, right ? So, placing secure acl's on the commands "net, time,
date, whatever ...) will make no difference, or am I seeing this wrong
?
So this is why I'm doing these strange hacks, not because I like'm,
but because i'm forced to.
Any suggestions or comments much appriciated
Cya,
Gert
Second, You can give users the right to change system time, and ONLY system
time using the resource kit and a batch file, for example:
----------------------------------------------------------------------------
@echo off
cls
:DO
for /f %%p in (pc.lst) do call :TIME %%p goto :END
:END
exit
:TIME
echo Setting Time Permissions for PC: %1
ntrights -u "domain users" -m %1 +r SeSystemTimePrivilege >> timelog.txt
----------------------------------------------------------------------------
--
This takes the computer names from a text file called pc.lst, and gives
domain users the right to change the time on each of the remote computers in
that list.
"Djeezus" <gert.va...@medisearch-int.com> wrote in message
news:fjuniu4incu7ephdk...@4ax.com...
But after that they shouldn't be able to have access to the time.
So How can I disable that ?
All comments much appreciated as ever ;-)
Thnx,
Gert
The thing I read was that if Win2k is PDC, the Win2k clients would
sync automatically, but only if PDC is Win2k, otherwise I'd need to
use "net time" or "ntp" stuff ...
That would be the solution indeed,
is there something like that too so that regular users can add static
routes in Win2k ... Is there a place I can go to read up about this ?
Thnx,
Gert
"Djeezus" <gert.va...@medisearch-int.com> wrote in message
news:ekioius13c3qif6ej...@4ax.com...