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. 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?...
  3. 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?...
  4. 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...
  5. Command prompt not opening

    in Windows 10 BSOD Crashes and Debugging
    Command prompt not opening: Hi All, Whenever I try to open a command prompt in windows 10 it crashes automatically. Please assist how to fix the same. https://answers.microsoft.com/en-us/windows/forum/all/command-prompt-not-opening/cc3ba5c9-0dda-421b-b0af-d3e128135a1c
  6. 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...
  7. Command opening and closing

    in AntiVirus, Firewalls and System Security
    Command opening and closing: Hi - Exactly every 52 seconds I have a command window that pops on and then off when on my desktop. I don't know what it is or how to go about preferably stopping it. Help! Thanks...
  8. Windows Command Prompt is not opening...

    in Windows 10 BSOD Crashes and Debugging
    Windows Command Prompt is not opening...: So I was trying to open the command prompt and every time the command prompt opened for a short while and it closes by itself. I mean it just flashes for a moment and I can't see a thing. I created a new administrator account and tried to open it and it worked. But I can't...
  9. Command prompt not opening

    in Windows 10 BSOD Crashes and Debugging
    Command prompt not opening: Hi, I recently installed a windows 10 update and noe cmd.exe does not work. I hvae tried many different methods to open it but all that happens is a small window flashes up ont he screen for a split second then dissapears. any ideas? s8on...
  10. Command Prompt Not Opening

    in Windows 10 Support
    Command Prompt Not Opening: Recently attempting to open Command prompt, ordinary or as administrator, it flashes for perhaps 2 seconds and then disappears. I tried the following commands sfc /scannow DISM /Online /Cleanup-Image /RestoreHealth But none of these seem to work, I'm wondering if there...