Sign in to follow this  
Followers 0
cplusdummy

How to execute .exe INDIRECTLY trough another .exe, .bat etc...

32 posts in this topic

Do you mean something like (extremely simplified .cmd batch file):

@ECHO OFF

START "" /WAIT NOTEPAD.EXE %1

http://ss64.com/nt/start.html

jaclaz

jaclaz you're the MAN! Simple answer to a simple question!

As promised, here's why I needed this...

squidooDOTcom/open-illustrator-files-in-maximized-window

I don't want to include the the full link as it would be considered as spam and retyping the answer would be annoying.

Before you might think there must be a simpler solution for this... well, there is not! Googled it and people are reporting this problem to no avail.

Thank you everybody!

Edited by cplusdummy
0

Share this post


Link to post
Share on other sites

Well, your explanation is completely unlike an explanation :w00t: , post the full link if you want to explain something.

BTW that small batch will also open a command prompt window if double clicked or added to a context menu.

You might want to use a tool like nircmd:

http://www.nirsoft.net/utils/nircmd.html

instead.

Look for it's commands exec, exec2 and execmd

http://www.nirsoft.net/utils/nircmd2.html#using

jaclaz

0

Share this post


Link to post
Share on other sites

Well, your explanation is completely unlike an explanation :w00t: , post the full link if you want to explain something.

Okay,

http://www.squidoo.com/open-illustrator-files-in-maximized-window

I'll edit the squidoo post tomorrow and link back to this discussion for compensation...

Yes, it opens the command prompt window but once the file opens it disappears.

Thanks again!

0

Share this post


Link to post
Share on other sites

Yes, it opens the command prompt window but once the file opens it disappears.

With the /WAIT parameter? :unsure:

Even if it does, let me rephrase previous post as "a black box will either open (and remain open until you terminate the "target" program) or flash briefly on the screen, to avoid that use nircmd, INSTEAD" :whistle:

jaclaz

0

Share this post


Link to post
Share on other sites

I dont know if this is what he wants, but this hides the cmd promt window, just

drag and drop any file notepad can open,


Dim C34 :C34=Chr(34)
If WScript.Arguments.Count = 1 Then
CreateObject("Wscript.Shell").Run("%Comspec% /C @Echo Off && Start " & _
C34 & "" & C34 &"/Wait Notepad.exe " &WScript.Arguments(0)),0,True
End If

Notepad.vbs in Cmd promt, open the text file

CD C:\Users\Gunsmokingman\Desktop

echo %CD%

C:\Users\Gunsmokingman\Desktop

OpenNotepad.vbs TelusUpload.txt

0

Share this post


Link to post
Share on other sites

Yes, it opens the command prompt window but once the file opens it disappears.

With the /WAIT parameter? :unsure:

Even if it does, let me rephrase previous post as "a black box will either open (and remain open until you terminate the "target" program) or flash briefly on the screen, to avoid that use nircmd, INSTEAD" :whistle:

jaclaz

I'm really not familiar with windows scripting/programming but I have PHP knowledge so I added the /MAX parameter after /WAIT using some logic.

Now when I double click on .ai or .eps file the black box opens and remains open until the program completely processes/opens the file. After few seconds, once the file is opened and editable the box DISAPPEARS AUTOMATICALLY.

I don't know if this is how it's supposed to function but it's serving the purpose perfectly! :thumbup

0

Share this post


Link to post
Share on other sites

make batch file start C:\Windows\System32\Notepad.exe

then save as .bat and all files.

when you run it it'll open notepad

0

Share this post


Link to post
Share on other sites
make batch file start C:\Windows\System32\Notepad.exe

then save as .bat and all files.

when you run it it'll open notepad

You mean like was proposed by jaclaz in post#11??? :whistle:

You might want to read a thread to get the full gist first... ;)

( yeah, I've done the "repeat someone else" before... :blushing: )

0

Share this post


Link to post
Share on other sites

The only ways you can use a script is to associate a particular process with a specific file extension. (They are talking about double clicking on a .txt file)

If you want to have a script executed in this manner you'd need to re-associate .txt files on the end user's system with the scripting engine pertinent to the type of script you're invoking.

Your alternative is to create a script 'packaged/compiled' to an executable, name it notepad.exe in the location of your proper notepad.exe and use it to call that original notepad exe in its new location.

The problem with both those approaches is that that they are to be carried out on your end users PCs.

0

Share this post


Link to post
Share on other sites

Yzöwl , the OP already tested the proposed solution, modified it a little according to his needs and is using it successfully (for his needs):

Now when I double click on .ai or .eps file the black box opens and remains open until the program completely processes/opens the file. After few seconds, once the file is opened and editable the box DISAPPEARS AUTOMATICALLY.

I don't know if this is how it's supposed to function but it's serving the purpose perfectly! :thumbup

This thread (actualy the issue that originated it) was "closed" until DataCracker7899 revived it by re-posting (incompletely) the SAME info already posted in it.

jaclaz

0

Share this post


Link to post
Share on other sites

so what? who cares. it isnt a big deal

Actually it's NO deal at all.

jaclaz

0

Share this post


Link to post
Share on other sites

Yzöwl , the OP already tested the proposed solution, modified it a little according to his needs and is using it successfully (for his needs):

I cannot find anything posted which provides what was asked. That was the reason for my response, (I certainly had no interest in replying to the pointless ramblings of DataCracker7899).

Double clicking on a .txt file will not open a batch script with the 'clicked' file as a parameter. Double clicking on a .txt file will only open that .txt file in whatever program has been associated with .txt files.

Right clicking could provide workable options but, as I stated, double clicking will not unless you make changes on the end users system.

0

Share this post


Link to post
Share on other sites

so what? who cares. it isnt a big deal

It just totally refutes your claim in your sig:

I am a professional programmer ... i'm master in many programming languages and i can make websites too.

The lack of capitalization and proper consistent sentence structure and punctuation in either your posts or your sig don't look very professional either.

By the way, I agree with jaclaz's guess that your age is 13 or 14 at most.

Look, no matter what you age is, you are perfectly welcome to be here and your participation is encouraged, but not your "pointless ramblings", as Yzöwl pointed out.

Cheers and Regards

0

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.