Windows 10: command file: Opening a window only if not already opened

Discus and support command file: Opening a window only if not already opened in Windows 10 Software and Apps to solve the problem; I am on a Windows 10 Home PC, ver. 21H1. I am a newbie to command files. I've written one to execute a program, and then display my local Temp folder.... Discussion in 'Windows 10 Software and Apps' started by Leah01, Jun 10, 2021.

  1. Leah01 Win User

    command file: Opening a window only if not already opened


    I am on a Windows 10 Home PC, ver. 21H1. I am a newbie to command files. I've written one to execute a program, and then display my local Temp folder. Unfortunately, if the Temp folder already is displaying in Explorer, the command opens a new instance of that window. How would I modify it to open the Temp window only if it has not already been opened, and otherwise, just give the open Temp window the focus? Thank you. Here's my code: @Echo off "C:\Program Files\progManufacturer\progName\prog.exe" -l %SystemRoot%\explorer.exe %temp% exit

    :)
     
    Leah01, Jun 10, 2021
    #1
  2. temp02 Win User

    .txt will open open in Command Prompt

    I miss the Windows XP file association manager, it allowed you to select which of the commands would be executed when you double click a file (open, print, edit, etc...), it was removed since Vista.
    Some good people created the Types application, which you can use to select the default action of the file double click, all you go to do is select the "txt" extension from the list, right mouse click, hit "Properties" and on the "Actions" tab right click "open" command and assign "Default" to it.
    Hopefully this will solve your problems, although I think your PC is probably infected with some kind of malware that will continuously change that setting back, so I also advise installing some anti-virus like MSE or NOD-32 and preform a full scan.
    Good luck.
     
    temp02, Jun 10, 2021
    #2
  3. Ketxxx Win User
    opening .dds files with gimp

    Simply, HOW? I got the DDS plugin but the POS wont open DDS files still. Can someone give me a step-by-step rundown of how to install the DDS plugin for gimp so I know if I'm missing something?
     
    Ketxxx, Jun 10, 2021
    #3
  4. ste2425 Win User

    command file: Opening a window only if not already opened

    Command windows opening behind other windows

    Hi all,

    Hopefully a quick one here.

    Ive made a small application to poll TeamCity build monitor take data about current and past builds and store them in a data base. Its only a very small application and im using windows task scheduler to run it every five minuets. Its working grand and does everything its meant to however when it runs it open a command window. Im not displaying anything nor taking user input and its finished and closed in under half a minuet but it opens on top of any windows I already have open. Control is still focused on the window I was working in before the command window opened. What id like to know is there a way within either task scheduler or something I can programme within the application to either stop the command window opening up but the application still run as its not needed or to make it automatically open behind all other open windows?

    Thanks all
     
    ste2425, Jun 10, 2021
    #4
Thema:

command file: Opening a window only if not already opened

Loading...
  1. command file: Opening a window only if not already opened - Similar Threads - command file Opening

  2. Open a program and it's data file with command line command

    in Windows 10 Gaming
    Open a program and it's data file with command line command: Been a long time since I used MSDOS-style syntax to create a batch file or edit a shortcut path. Could use some help.Would like to edit the path of a shortcut .lnk create a batch file don't know which one is best to run Microsoft Money Plus C:\Program Files x86\Microsoft...
  3. Open a program and it's data file with command line command

    in Windows 10 Software and Apps
    Open a program and it's data file with command line command: Been a long time since I used MSDOS-style syntax to create a batch file or edit a shortcut path. Could use some help.Would like to edit the path of a shortcut .lnk create a batch file don't know which one is best to run Microsoft Money Plus C:\Program Files x86\Microsoft...
  4. command prompt window not opening

    in Windows 10 BSOD Crashes and Debugging
    command prompt window not opening: command prompt window not opening due to incorrect password error. Administrator option also not showing https://answers.microsoft.com/en-us/windows/forum/all/command-prompt-window-not-opening/1e4c35bb-3e0d-4982-8b15-dfd92f6e3912
  5. command prompt window not opening

    in Windows 10 Gaming
    command prompt window not opening: command prompt window not opening due to incorrect password error. Administrator option also not showing https://answers.microsoft.com/en-us/windows/forum/all/command-prompt-window-not-opening/1e4c35bb-3e0d-4982-8b15-dfd92f6e3912
  6. command prompt window not opening

    in Windows 10 Software and Apps
    command prompt window not opening: command prompt window not opening due to incorrect password error. Administrator option also not showing https://answers.microsoft.com/en-us/windows/forum/all/command-prompt-window-not-opening/1e4c35bb-3e0d-4982-8b15-dfd92f6e3912
  7. Starting batch file only opens command prompt versus running the batch file?

    in Windows 10 Gaming
    Starting batch file only opens command prompt versus running the batch file?: I'm trying to run one batch file, then another. Instead of running the 2nd batch file, it just opens another black screened command prompt with the name of the batch file as the first line in the command prompt? Any ideas why?...
  8. Starting batch file only opens command prompt versus running the batch file?

    in Windows 10 Software and Apps
    Starting batch file only opens command prompt versus running the batch file?: I'm trying to run one batch file, then another. Instead of running the 2nd batch file, it just opens another black screened command prompt with the name of the batch file as the first line in the command prompt? Any ideas why?...
  9. No app is opening, only file explorer is open

    in Windows 10 Software and Apps
    No app is opening, only file explorer is open: Today when I opened Avast antivirus, it showed me that almost 113 registry keys are broken, so I pressed the button to fix them. Windows was working fine before I pressed the button. Then Avast opened a blank white screen, I thought I must close it as it has got hanged and...
  10. Command window does not open?

    in Windows 10 Drivers and Hardware
    Command window does not open?: Hello, I have a problem unswar: I want to do something at the command prompt but can't open it. If I open it no matter whether with admin rights or not it is below briefly to see and again away. Is there anyone who can help me MFG and thanks in advance Command...