473,407 Members | 2,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Windows utility to get the full command line path for a process

Hi All,

I need a windows utility which can get me the command line path for a process. Say I have an application which has a java.exe process running, it should return me the install directory for the same. I need to execute that utility from a javascript.

Any help is much appreciated!
Jun 12 '07 #1
3 9658
bartonc
6,596 Expert 4TB
Hi All,

I need a windows utility which can get me the command line path for a process. Say I have an application which has a java.exe process running, it should return me the install directory for the same. I need to execute that utility from a javascript.

Any help is much appreciated!
You'll want to get Process Explorer. There are a couple of other cool tools there, as well.
Jun 12 '07 #2
bartonc
6,596 Expert 4TB
You'll want to get Process Explorer. There are a couple of other cool tools there, as well.
Sorry. I only read the first half of your post. Since Sysinternals can do it, there must be a way to query to OS for this info. I'll check around a bit to see what I can find.
Jun 12 '07 #3
ghostdog74
511 Expert 256MB
Hi All,

I need a windows utility which can get me the command line path for a process. Say I have an application which has a java.exe process running, it should return me the install directory for the same. I need to execute that utility from a javascript.

Any help is much appreciated!
here's a vbscript snippet
Expand|Select|Wrap|Line Numbers
  1.  
  2. Set Processes = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2").ExecQuery("select * from Win32_Process where Name='SMSS.exe'")
  3. For each Process in Processes
  4.    PList = PList & Process.CommandLine & vbLf
  5. Next
  6. WScript.Echo "command line: " & VBlf & VBlf & UCase(PList)
  7.  
Jun 12 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Christian Long | last post by:
Hi I'm trying to pipe data into a python program on Windows 2000, on the command line. Like this: dir | myProgram.py Here's what I tried:
6
by: Colin Brown | last post by:
Recently I was looking for remote management tools and came across "Windows Management Instrumentation". There is a python interface available: http://tgolden.sc.sabren.com/python/wmi.html I...
5
by: Achim Domma (Procoders) | last post by:
Hi, is there a way to tell windows, that *.py files are executable, like ..bat, .js, ...? If I have someTool.py somewhere in my path I would like to type only 'someTool param1 param2'. Is that...
2
by: Ken Lindner | last post by:
I have a need to become familiar with SQL Server 2000 for work. Needless to say I am new to SQL Server any version, but not IT in general. My employer has provided me with the SQL Server 2000...
0
by: darknessfish | last post by:
Ok, I'm trying to write a basic scp scheduler, which will occasionally scan a directory, and use cygwin's scp.exe to copy the files to a Unix box. After various problems, the set up I've got now...
4
by: Primo | last post by:
Hi, This problem has been frustrating me for days and I hope you experts can help me out. I am trying to run a command, which I would normally run from the command line, from within my C#...
34
by: Ben Sizer | last post by:
I've installed several different versions of Python across several different versions of MS Windows, and not a single time was the Python directory or the Scripts subdirectory added to the PATH...
0
AmberJain
by: AmberJain | last post by:
Windows Autorun FAQs: Programs dealing with autoruns Linked from the Original article- "Windows Autorun FAQs: Description". Que: Can you list programs that help me to view/modify the autoruns...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.