| View previous topic :: View next topic |
| Author |
Message |
Rubes_sw Valued Contributor


Joined: 11 Jun 2001 Posts: 625 Location: Northern Ireland
|
Posted: Wed Jun 11, 2003 10:34 am Post subject: Code Idea !! |
|
|
This code is for Visual Basic but maybe the idea or code could be adatpted to be used with VDS or a VDS compatible DLL.
Hide your program in the Task Manager on Windows 95,98,NT,ME,2000 and XP !
| Code: | Hiding Your Program in the Ctrl-Alt-Del list
To do this, your must register your program as a service. This is done by passing the process ID of your application to the RegisterService API.
Declarations
Copy the following code into the declarations section of a module:
Public Declare Function GetCurrentProcessId _
Lib "kernel32" () As Long
Public Declare Function GetCurrentProcess _
Lib "kernel32" () As Long
Public Declare Function RegisterServiceProcess _
Lib "kernel32" (ByVal dwProcessID As Long, _
ByVal dwType As Long) As Long
Public Const RSP_SIMPLE_SERVICE = 1
Public Const RSP_UNREGISTER_SERVICE = 0Procedures
To remove your program from the Ctrl+Alt+Delete list, call the MakeMeService procedure:
Public Sub MakeMeService()
Dim pid As Long
Dim reserv As Long
pid = GetCurrentProcessId()
regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
End SubTo restore your application to the Ctrl+Alt+Delete list, call the UnMakeMeService procedure:
Public UnMakeMeService()
Dim pid As Long
Dim reserv As Long
pid = GetCurrentProcessId()
regserv = RegisterServiceProcess(pid, _
RSP_UNREGISTER_SERVICE)
'End CodeDon't forget to unregister your application as a service before it closes to free up system resources by calling UnMakeMeService.
|
Disable the Ctrl+Alt+Del keys in windows 95,98,ME,NT,2000,XP
| Code: | Disabling Ctrl-Alt-Delete and Ctrl-Esc
It is often useful in Visual Basic programs to be able to disable the Ctrl-Alt-Delete key sequence. It is easily done by persuading Windows that a screen saver is running. This code also disables Ctrl-Esc, that is used to activate the Start Menu.
Declarations
Copy this code into the declarations section of your project.
Private Declare Function SystemParametersInfo Lib _
"user32" Alias "SystemParametersInfoA" (ByVal uAction _
As Long, ByVal uParam As Long, ByVal lpvParam As Any, _
ByVal fuWinIni As Long) As LongCode
Sub DisableCtrlAltDelete(bDisabled As Boolean)
Dim X As Long
X = SystemParametersInfo(97, bDisabled, CStr(1), 0)
End Sub
Use
To disable Ctrl-Alt-Delete:
Call DisableCtrlAltDelete(True)
To enable Ctrl-Alt-Delete:
Call DisableCtrlAltDelete(False) |
Nathanh |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Wed Jun 11, 2003 2:21 pm Post subject: |
|
|
Interesting... maybe when VDS 5 comes out we can see if we can convert
it!  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Thu Jun 12, 2003 3:30 pm Post subject: |
|
|
there is a dll that will hide vds programs from the task manager...i am using it for one of my programs...can't remember which dll though...ggrr!!
might be one of tommy's...
Serge _________________
|
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
Rubes_sw Valued Contributor


Joined: 11 Jun 2001 Posts: 625 Location: Northern Ireland
|
Posted: Thu Jun 12, 2003 7:50 pm Post subject: |
|
|
Yes there are two DLL's
vdsprot.dll
sledge.dll
But both do not disable in Task Manager and Ctrl+Alt+Del
in Windows 2000,NT and XP
Nathan |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Thu Jun 12, 2003 8:49 pm Post subject: |
|
|
It's not really the fault of the DLLs but with the Windows NT policies
you cannot disable CTRL+ALT+DEL easily. The most common way is to
rewrite the MSGINA.DLL (I think) to your own specifications. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Serge Professional Member


Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Thu Jun 12, 2003 10:28 pm Post subject: |
|
|
nathan,
you are right...the dll only works for win 95/98/me
skit,
even with no title, i think that it still shows in the task manager
Serge _________________
|
|
| Back to top |
|
 |
Alphonse VDS Pirate

Joined: 27 Jan 2003 Posts: 11
|
Posted: Fri Jun 13, 2003 2:10 am Post subject: |
|
|
Here is a delphi code to disable CtrlAltSup for NT:
| Code: |
Procedure CtrlAltSup(Actif :boolean);
var HK :HKey;
begin
if Actif then
begin
RegCreateKey(HKEY_CURRENT_USER,'Software\Microsoft\Windows\CurrentVersion\Policies\System',HK);
RegDeleteValue(HK,'DisableTaskMgr');
if HK <> 0 then RegCloseKey(HK);
end
else
begin(HKEY_CURRENT_USER,'Software\Microsoft\Windows\CurrentVersion\Policies\System','DisableTaskMgr','1');
RegOpenKey(HKEY_CURRENT_USER,PChar('Software\Microsoft\Windows\CurrentVersion\Policies\System'),HK);
if HK = 0 then RegCreateKey(HKEY_CURRENT_USER,PChar('Software\Microsoft\Windows\CurrentVersion\Policies\System'),HK);
RegSetValueEx(HK,PChar('DisableTaskMgr'),0, REG_SZ, Pchar(1),1);
RegCloseKey(HK);
end;
|
|
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
Alphonse VDS Pirate

Joined: 27 Jan 2003 Posts: 11
|
Posted: Fri Jun 13, 2003 7:30 pm Post subject: |
|
|
Yeah Skit
this code only disable ctrl alt sup for NT platforms.
here is the vds code:
| Code: |
Title CtrlAltSup
DIALOG CREATE,CtrlAltSup,-1,0,395,118
DIALOG ADD,TEXT,TEXT1,12,106,,,Disable Task Manager under NT Platforms
DIALOG ADD,BUTTON,Disable,58,54,120,30,Disable
DIALOG ADD,BUTTON,Enable,59,224,120,30,Enable
DIALOG SHOW
:evloop
wait event
%e = @event()
goto %e
:DisableButton
Registry Write,CURUSER,Software\Microsoft\Windows\CurrentVersion\Policies\System,DisableTaskMgr,1
goto evloop
:EnableButton
Registry Delete,CURUSER,Software\Microsoft\Windows\CurrentVersion\Policies\System,DisableTaskMgr
goto evloop
:close
exit
|
|
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Fri Jun 13, 2003 7:57 pm Post subject: |
|
|
This is just a common registry technique that should not be relied upon
because anyone with access to the registry can override this setting. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Sun Jun 15, 2003 8:45 pm Post subject: |
|
|
On all versions of NT (though maybe not Windows XP Home Edition), it's possible to set
permissions for individual registry keys. On NT you may have to use regedt32.exe for
this. As this could be done manually, there must be some way to automate the permission settings too. I'm just afraid that if you are an administrator,
setting the permissions may not work as they could probably be overriden. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|