Jump to content

Can Run commands if directory name is too long!


Recommended Posts

I am trying to run an exe under \program files\winrar\hotfix.exe with

[GuiRunOnce]

%systemdrive%\install\progs.cmd

I tried

ECHO.ECHO Example...ECHO Please wait...start /wait %systemdrive%\progra~1\winrar\hotfix.exe

and

ECHO.ECHO Example...ECHO Please wait...start /wait %systemdrive%\program files\winrar\hotfix.exe

both didnt work. Is there a way to make this thing run ?

Link to comment
Share on other sites


:) I also tried both didnt work

ECHO.ECHO Example...ECHO Please wait...start /wait %programfiles%\winrar\hotfix.exe

When it is like this it give this error "Windows cannot find 'c:\program'.Make sure you typed the name correctly....."

ECHO.ECHO Example...ECHO Please wait...start /wait "%systemdrive%\program files\winrar\hotfix.exe"

When it is like this it give this error "^CTerminate batch job <yes/no>?"

anyone have any suggestions ?

Link to comment
Share on other sites

I've had similar problems to this (trying to launch a standard GUI Win32 app from a command prompt) with not very good results. One thing you might try (though start /wait wouldn't quite work correctly with it) is to pack it in a self-extracting RAR archive and call that. You can configure the SFX module to automatically launch the program upon extraction.

Link to comment
Share on other sites

okay, so i am a complete newbie id***, but for what reason are you hitting Ctrl+C during the call to hotfix.exe in your:

^CTerminate Batch Job? Y/N

example?

Does the machine get hung up? If nothing else, the non-appearance of the 'cannot find...' message probably indicates that you've successfully called hotfix.exe.

So it would seem that your original problem has been solved in favor (?) of a different one, i.e., why is it taking so long to run hotfix.exe that you are compelled to hit Ctrl+C?

Slower machine?

Hope this helps and isn't a waste of anyone's time. :-)

Link to comment
Share on other sites

I am not hitting ctrl+C. It is doing all by it self.

As I said if I do

start /wait "%programfiles%\winrar\hotfix.exe"

this line opens an other command window titled hotfix.exe when I close it gives the "^CTerminate Batch Job? Y/N" message. And the machines does not hung up...

Link to comment
Share on other sites

use START "" /WAIT "long path\whatever"

the START command actually uses the first quoted parameter as the window title, passing "" will fill the first quoted parameter with null and the second one will work

Link to comment
Share on other sites

@pinout: i've never had to do that when using long filename execution

i for one can't understand why it doesn't work anyway?

i have run almost every program imaginable through the start command and never had a problem...

i also cannot understand why "%programfiles%\winrar\hotfix.exe" doesn't work and loads another dos window

been there done that.

that line opens an other command window titled hotfix.exe

what does the other window titled hotfix.exe do? maybe that is the hotfix being run?

this sounds like what was happening to me when i was trying to get the WPI.HTA running through DetachedProgram by calling mshta.exe.... my problem there was it was far too early in the GUI setup stage to be calling HTA files or even mshta.exe (If i ran "start /wait mshta.exe wpi.hta" i would get a command window pop up titled mshta.exe, whereas if i ran that in windows it would load the wpi.hta file)...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...