GIDForums  

Go Back   GIDForums > Computer Forums > Computer Software Forum - Windows
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 29-Aug-2006, 04:19
rajeev nair rajeev nair is offline
Junior Member
 
Join Date: Aug 2006
Posts: 97
rajeev nair is an unknown quantity at this point

Running an application in hidden mode


Hello,

I have an exe file which is executed every time I start my PC system.Now I want this application to run in the background (i.e silent or hidden mode).I dont want other's to know that the application is running.

Is there anyway where in which I could do this for example an option I could add in the registry or any change in my code (c++) to make the exe run invisible to others.

I have seen other free software downloads which can make icons or applications invisible.But all these software require the user to manually select the exe (which is running at present) or icon which should be made invisible.

I need my application which is in C++ coding to be executed invisibly....any way to achieve this?..Help would be appreciated.

Thank You,
Regards,
Rajeev Nair.
  #2  
Old 12-Sep-2006, 12:01
Ridjidji Ridjidji is offline
New Member
 
Join Date: Sep 2006
Location: France
Posts: 3
Ridjidji is on a distinguished road

Re: Running an application in hidden mode


You can't make it invisible.
Quote:
I dont want other's to know that the application is running.

They will see that your application is running if they have a look at the taskmanager.
  #3  
Old 12-Sep-2006, 23:29
rajeev nair rajeev nair is offline
Junior Member
 
Join Date: Aug 2006
Posts: 97
rajeev nair is an unknown quantity at this point

Re: Running an application in hidden mode


hi,

Thanks for the response.Yes I know that the exe which is currently running can be viewed from the task manager.

What my aim is to hide the console which opens up every time in the background whenever the exe is running.In other words the exe file should run silently in the background.

Help would be appreciated,

Regards,
Rajeev
  #4  
Old 13-Sep-2006, 05:04
Ridjidji Ridjidji is offline
New Member
 
Join Date: Sep 2006
Location: France
Posts: 3
Ridjidji is on a distinguished road

Re: Running an application in hidden mode


Try the ShowWindow(hWnd, 0); from the win32 API ?
You can also compile your application as a "win32 application" : the program will not display the window
  #5  
Old 13-Sep-2006, 06:03
rajeev nair rajeev nair is offline
Junior Member
 
Join Date: Aug 2006
Posts: 97
rajeev nair is an unknown quantity at this point

Re: Running an application in hidden mode


Hi,

I have tried using the showwindow() function, now my doubt is how should I compile my code.I am using borland C++ complier and there is an option for compiling windows application and on compiling I get the following error:

Quote:
C:\siva>bcc32 -tW t.cpp
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
t.cpp:
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Error: Unresolved external 'WinMain' referenced from C:\BORLAND\BCC55\LIB\C0W32.
OBJ


My code is:

Quote:
CPP / C++ / C Code:
#include <iostream>
#include<windows>

int main()
{

	HWND  hWnd;

          ShowWindow(hWnd, 0);

          system("sss -l");

}

If I compile this code as a normal cpp file it is compiled without any error.But on running the exe it displays output. (i.e it does not run silently in background).

The code forces an exe file (sss.exe) which performs locking of the PC on local system.I want this program to be executed silently in the background (without any displays) everytime the PC is started.

Regards,
Rajeev
  #6  
Old 14-Sep-2006, 13:15
Ridjidji Ridjidji is offline
New Member
 
Join Date: Sep 2006
Location: France
Posts: 3
Ridjidji is on a distinguished road

Re: Running an application in hidden mode


Use ShellExecute to launch "sss -l", this doesn't stop the program
Get the handle of the window you would like to hide and then, use ShowWindow(handle, 0);
find a way to get the handle when your program starts of use FindWindow
The problem : if you use FindWindow, the window will be dispplayed, and then, your prog will hide it.
  #7  
Old 15-Sep-2006, 04:20
rajeev nair rajeev nair is offline
Junior Member
 
Join Date: Aug 2006
Posts: 97
rajeev nair is an unknown quantity at this point

Re: Running an application in hidden mode


Hi,

Quote:
ShellExecute(NULL, "open","s.exe", NULL, NULL, SW_HIDE);


On using shellexecute to launch the exe and using SW_HIDE option the exe runs silently.

Now I am making use of an utlity called psexec (executes the exe file in a remote or local PC).If I try to execute the t.exe file (this exe performs the shellexecute function) on a remote PC or even local PC using psexec utility the file is not executed an returns error 0.

I have used psexec on some c++ (exe files) which seems to work fine so far.but it fails in this case.Any ideas??..

Thanks for the help,
Regards,
Rajeev
 

Recent GIDBlogFirst week of IA training by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The Specified CGI Application Misbehaved by not running a complete set of HTTP Header SSS Computer Software Forum - Windows 2 16-Oct-2006 23:01
Problem in running an application outside IDE Paramesh CPP / C++ Forum 13 06-Feb-2006 23:06
Help! Some basal questions about MFC xutingnjupt MS Visual C++ / MFC Forum 1 05-Dec-2004 03:38
[Tutorial] Standard I/O aaroncohn C Programming Language 20 27-Feb-2004 21:07
web server in secure mode not connecting to http application tcsasp Apache Web Server Forum 0 06-Nov-2003 00:08

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 04:23.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.