Link to home
Start Free TrialLog in
Avatar of JavierLopezMCP
JavierLopezMCPFlag for United States of America

asked on

creating a process via cmd

I have a need to create a process using the command line. I dont want to have to create a vbs script to run to create this. Is there a cmd line i can run?

If not.. is there a way to open notepad completely hidden and not just minimized via the cmd line?
Avatar of Harsem
Harsem

Hello,
I do not know how much control you have over the end-client, so I do not know what options below suit you (if any).
You can use CHP (http://www.commandline.co.uk/chp/) which will need to be run from the client.
Microsoft is encouraging the use of PowerShell - which can do what you want.

Both of the above are to hide the fact that I do not know if what you ask is possible.
What type of process do you want to create? Please provide more info.
Avatar of JavierLopezMCP

ASKER

What I have is a vbs file that is running and has a while loop..

the while loop looks for a process and puts up a please wait window... as soon as the process closed it removed to wait window. I've tried opening and closeing the process in vbs but i get stuck in a loop and the script never finishes.. so i create a bat file that opens notepad minamized.... then runs my application bat.. then closes notepas.. meanwhilie the vbs moves to the next step which is the please wait loop... once the bat file killtask notepad.exe.. the vbs exits the please wait window loop.

I would like to either create process(instead of notepad) within the bat file or open notpad hidden.
When you say you want to 'create a process' do you mean you want to create a batch file with a '.BAT' extension?
I have a vbs file that is running and has a while loop...
Can we see your VB code?

so i create a bat file that opens notepad minamized...
Can we see the batch file?
Can you explain your end goal here. What are you trying to create a process for? Is this for a kiosk?
Hey guys.. thanks for responding..

I've attached the vbs I am running... when you look at it you'll notice that I am calling a Bat file...

That bat file contains the following code...

start /min notepad.exe
start /wait cmd /c "C:\somefolder\some.bat"
taskkill /f /im notepad.exe


My goal is to make the notepad run hidden.... or create a process that the WaitMessage() function can run against.

When i ran the notepad within VBS ... i was able to do it hidden but then the taskkill cmd command did not work because it didnt have permission to close it.

I know I might have my loop writen incorrectlstart /min notepad.exe
start /wait cmd /c "C:\csc\cswstart.bat"
taskkill /f /im notepad.exe

I think i may have my loop writen incorrectly..

Thanks again.
Sorry ... Had to change the ext.
Here is the VBS file
DateChecker.txt
No on has responded to my script.. can someone help!
ASKER CERTIFIED SOLUTION
Avatar of CitizenRon
CitizenRon
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
OMG.. so simple and so effective.. thank you!!!!

I didn't even think of creating and deleting a file..

Thanks again!