Hot Downloads

Welcome, Guest
Username: Password: Remember me

TOPIC: Batch File/Script

Batch File/Script 9 years 4 days ago #24209

  • skepticals
  • skepticals's Avatar
  • Offline
  • Expert Member
  • Posts: 783
  • Karma: 0
Hopefully someone can point me in the right direction with this situation...

We have a software application that calls a file "Remove.exe" when a user closes Internet Explorer AND when they log off the system (They are not logging off of Windows - just logging off a program.)

I replaced Remove.exe with my own modified file, but I only want the file to execute when someone logs off the system NOT when someone closes Internet Explorer.

Is there a way is some type of batch file or scripting language that I can have the system check if a processes is running? My thought is that when a user logs off there will be at least one less process; so in the batch file I can say somehting like, if this process is running do nothing and if the process is not running do this.

Or is there a better way?

I am open to other ideas as well...

Thanks!
The administrator has disabled public write access.

Re: Batch File/Script 9 years 4 days ago #24212

  • Smurf
  • Smurf's Avatar
  • Offline
  • Moderator
  • Posts: 1390
  • Karma: 1
Group policies can be configured to run a script during logoff.
Wayne Murphy
Firewall.cx Team Member
www.firewall.cx

Now working for a Security Company called Sec-1 Ltd in the UK, for any
Penetration Testing work visit www.sec-1.com or PM me for details.
The administrator has disabled public write access.

Re: Batch File/Script 9 years 4 days ago #24213

  • skepticals
  • skepticals's Avatar
  • Offline
  • Expert Member
  • Posts: 783
  • Karma: 0
(They are not logging off of Windows - just logging off a program.)

They are not logging off of Windows... this is why I am having this problem. In order to resolve it, I want to overwrite a file that the software calls and have it do what I want, but the file I am replacing gets called when a browser is closed and whey they log off (not Windows, it's an application that runs on top of Windows).

Does that make any sense?

I found a web site that will help me with the batch file, but now I am having a problem figuring out when the program calls the file. I am trying to use Windows/Sys Internal process monitor, but I can't make heads or tails of it.
The administrator has disabled public write access.

Re: Batch File/Script 9 years 4 days ago #24215

  • Smurf
  • Smurf's Avatar
  • Offline
  • Moderator
  • Posts: 1390
  • Karma: 1
How is the program called ? Not fully understanding how this program is executed when you close IE and the other application ?

Also, whats the program doing ?
Wayne Murphy
Firewall.cx Team Member
www.firewall.cx

Now working for a Security Company called Sec-1 Ltd in the UK, for any
Penetration Testing work visit www.sec-1.com or PM me for details.
The administrator has disabled public write access.

Re: Batch File/Script 9 years 4 days ago #24216

  • skepticals
  • skepticals's Avatar
  • Offline
  • Expert Member
  • Posts: 783
  • Karma: 0
Sorry, it's hard to explain...

Windows loads.
This software loads that takes up the entire screen and allows for a username and password to be entered. If you enter in a username and password the full screen goes away and allows you to use the computer. It is essentially just a session time program. It will kick the person off after a certain amount of time.

I am not exactly sure how the remove.exe file is called, but all it does is empty Internet Explorer's history. This is why I know I can safely overwrite it. The problem is I want my file to run only when a user is kicked off or logs off the software (again, not Windows).

Thoughts?
The administrator has disabled public write access.

Re: Batch File/Script 9 years 4 days ago #24218

  • TheBishop
  • TheBishop's Avatar
  • Offline
  • Moderator
  • Posts: 1719
  • Thank you received: 8
  • Karma: 5
Let me get this straight - you want to write a script that (among other things) checks whether a process is running? If so, you can do that in ActiveState Perl. Don't know offhand of a way to do it in a batch file, but I'll think about it
The administrator has disabled public write access.
Time to create page: 0.088 seconds

CCENT/CCNA

Cisco Routers

  • SSL WebVPN
  • Securing Routers
  • Policy Based Routing
  • Router on-a-Stick

VPN Security

  • Understand DMVPN
  • GRE/IPSec Configuration
  • Site-to-Site IPSec VPN
  • IPSec Modes

Cisco Help

  • VPN Client Windows 8
  • VPN Client Windows 7
  • CCP Display Problem
  • Cisco Support App.

Windows 2012

  • New Features
  • Licensing
  • Hyper-V / VDI
  • Install Hyper-V

Linux

  • File Permissions
  • Webmin
  • Groups - Users
  • Samba Setup