windows - How to start an application in a given directory, using other as its working dir?

06
2014-04
  • user2723297

    For a system we are deploying for our customer we need to run the setup executable from %temp% and have it use for the installation, files in another directory. This cannot be solved at the application level. So, basically what I need it to somehow "cheat" the setup.exe located at %temp% to think it ran under another directory.

    Any ideas? I tried doing pushd & popd, that doesn't work because the OS tries to call setup.exe from the data files' directory, not setup.exe. I also tried calling setup.exe by running a bat from the data files directory, that basically calls it by doing:

    %temp%\setup.exe
    

    doing:

    cd %temp%
    setup.exe
    

    also failed

  • Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

    Related Question

    windows - Generic Stealth(er) for Programs
  • Senderkk

    Possible Duplicate:
    Run a completly hidden batch file

    Is there any program (is it even possible) that I can call from a batch file (.bat) like this:

    > stealthlaunch PROGRAM

    And it will launch the program without showing any window (or anything) to the user?

    Info: I need to launch and updater for the company prog ( a series of interlinked xls files), and I've done a batch that automates te proces for me (copying files, patching files, installing new components), but I really hate do have people seeing the programs POP-UP


  • Related Answers
  • Krazy_Kaos

    Could this be what you're looking for:

    Hidden Start

    From the site:

    Console applications and batch files are regularly run at Windows startup or in a schedule. The main inconvenience of this is that each application opens a console window that flickers on the screen. Hidden Start (or Hstart) is a lightweight command line utility that allows you to run console applications and batch files without any window in the background, handle UAC privilege elevation under Windows 7 and Vista, start multiple commands in parallel or synchronously, and much more.

    Screenshots: enter image description here enter image description here

    Examples:

    Hstart is usually started by entering the following command line:
    
    hstart /NOCONSOLE "batch_file_1.bat" "batch_file_2.bat" "batch_file_3.bat"
    It is possible to redirect the console output of batch files into a log file:
    
    hstart /NOCONSOLE /IDLE /D="E:\Backups" 
         "cmd.exe /c "MyDailyBackup.bat > backup-log.txt""
    The /IDLE command line switch means that the backup process will run with the lowest priority class, and /D="" sets the starting directory of the batch file (required if the command line or script contain relative paths).
    

    Other resources(solutions):