So normally I have several *.bat files to automate some things in my computer.   But I'm kinda stuck in this call...  cd "C:\Users\user\AppData\Local\Programs\program2Execute" start program has spaces.exe   I don't get the app executed, instead I get a cmd window with the cd command result, nothing else. I tried to quote "program has spaces.exe" but it doesn't get executed I get the window duplicated instead.   Apologize if this is kinda dumb to ask, but I have spent quite time looking for the answer.  Thanks in advance.
79165
I need to create a batch file which starts multiple console applications in a Windows .cmd file.  This can be done using the start command.  However, the command has a path in it.  I also need to pass paramaters which have spaces as well.  How to do this?  E.g. batch file  start "c:\path with spaces\app.exe" param1 "param with spaces"
39309
How do you compile and execute a .cs file from a command-prompt window?
25833
After (hopefully) scrubbing viruses out of a Windows 7 installation (after deciding not to simply run over the laptop repeatedly with my car), I've got everything almost back to normal. The only lingering issue I have is that for my non-admin users, the ".exe" file extension doesn't work. That is, clicking on the various desktop application links results in a "How do you want to open this?" dialog.  I've been through the alleged registry fixing from "winhelponline" and that had absolutely no effect.  I've tried running "assoc" for the affected users, but it reports the .exe association to be "exefile" even though it persistently does not work.  Right-clicking on a desktop icon and then choosing "start" does successfully open an application, but that's clearly a terrible situation.  For my admin user, things seem to work fine.  What do I need to do to get things working?
81916
I'm trying to execute multiple commands without create a new process each time. Basically, I want to start the DOS command shell, switch to the MySQL command shell, and execute a command. Here's how I am calling the procedure (also below). Also, how do I handle the "\"'s in the command?  ExecuteCommand("mysql --user=root --password=sa casemanager", 100, false);  ExecuteCommand(@"\. " + Environment.CurrentDirectory + @"\MySQL\CaseManager.sql", 100, true);  private void ExecuteCommand(string Command, int Timeout, Boolean closeProcess) {     ProcessStartInfo ProcessInfo;     Process Process;      ProcessInfo = new ProcessStartInfo("cmd.exe", "/C " + Command);     ProcessInfo.CreateNoWindow = false;     ProcessInfo.UseShellExecute = false;     Process = Process.Start(ProcessInfo);     Process.WaitForExit(Timeout);      if (closeProcess == true) { Process.Close(); } }
100992
I'm not sure what commands are issued when trying to launch a program from the dash.  How can I determine this and modify the commands of these short cuts?  For example, I would like to change the command to launch skype from:  skype   to  LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so skype   I'm not sure which command is issued when I click on the icon in the dash and I'm not sure how I would change it.  Changing it using gnome menu editor does not seem to have any effect.
102702
When using the command line, cd is one of the most frequently used shell commands. I've gotten used to the ability to type cd, pressing tab, and then pressing tab again to see what directories there are to cd into. Ubuntu has recently started including the colord package and its tools start with cd. Now if I press cd and tab, I get this: $ cd cd                 cd-fix-profile     cd-it8              cd-create-profile  cd-iccdump           How can I make sure all those cd-* executables don't show up when I'm using the command line? I assume they are necessary for the OS, so I can't just move them out or rename them; however, I don't want them to be completed or even visible when I'm in bash. Note that this is under bash 4.4.20(1) which is what comes with Ubuntu 18.04. As an aside: are those executables still included in Ubuntu 20.04?
82137
On Windows/DOS terminals a cd.. correctly change the directory.  On Linux terminals the dots from the cd command have to be separated. I'd like to know how/why is this necessary for the parser to work. If no space is added then the command is not understood.   This works well   cd ..   This does not work  cd..   Probably the regExp or whatever is parsing the commands is not including the dot as a possible character immediately after the command.
81740
Suppose I have a program named any_program.exe and my operating system drive is C:. The location of the program is D:\Any_Folder\any_program.exe  How do I start/execute that program via command prompt in Windows 8?  I have tried the command line START any_program.exe, but it shows me an error that      Windows cannot find 'any_program.exe'. Make sure you typed the name correctly, and then try again.   By the way, it worked perfectly in Windows 7. And, if I type START notepad.exe or START firefox.exe (Firefox is not installed in C: drive), it works in Windows 8.
78445
I've created an environment where I use 3 different desktop configurations, but every time I reboot, I have to manually open each program in that target desktop to make it look like it did before.   So, I'd like to write a .bat file that can get all my programs running in their appropriate desktops. I'm wondering if something like this is possible:  "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -desktop:2 "C:\Program Files\My\Other\Software.exe" -desktop:3 ...etc.   Obviously, this example is not real, but I hope there's something similar. I don't care if it's hacky :)
98883
Why is this?  When I do this   CD ~/Desktop   It doesn't take me to the Desktop. But this:  echo "foo bar" | GREP bar   gives me:  bar
89555
When I am trying to execute a file(name.sh) in the command line by the command  ./name.sh  , I am getting the error that:     "." is not recognized as an internal   or external command, operable or batch   file   please help me execute the .sh file
26729
Windows 8 64-bit. The user I'm logged in as has admin rights. When I open a cmd windows the window title even says "Administrator: cmd.exe".  So, I set my .bat file association to have the .bat file opened in Notepad++, and now I can't set it back to run the bat file when I double click on it. I've tried several web pages which told me to edit the registry to no avail.   When I do try to merge a .reg file into my PC, I get an error "You do not have permissions" or something. My user is not "administrator" but my user "chuck" does have admin rights. It always has.    I tried , the .reg file merged without error this time, but when I double click on a .bat file it still opens in Notepad++. I downloaded the file to change the .bat file assoc only. Do I have to restart the PC?  I also tried making the registry edits here: . It didn't work either.  The .bat file extension cannot be changed in the Associate File Extension with a Program in the Control panel. When I try to associate cmd.exe with a .bat file I get an error like "You cannot associate that program with this file." I found  but there is no .bat file entry under FileExts. Also on this link I have no no UserChoice key to delete for HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.b‌​at\UserChoice.  Rebooted PC, I still have the same problem. I will make sure Notepad++ is not restoring associations with itself each time it runs. EDIT: As far as NPP preferences are concerned, it does not register .bat files.    Any more ideas? I have been dealing with this for 3 months off and on now.   NOTE: Some fixes for this problem work on Windows 7 but DO NOT work on Windows 8.     UPDATE: Fixed it. I had to    Make a shortcut to regedt32.exe on my desktop.   Right click shortcut and do "Run As Administrator", even though my user has admin rights.  Search the whole registry for the string "notepad" whereon I found the sneaky little thing here: HKEY_CURRENT_USER\Software\Microsoft\Windows\\**Roaming**\OpenWith\FileExts\\.bat and deleted the UserChoice item.  Reboot windows.
51518
I would like wine to automatically run exe's without having to call wine everytime I have to execute the cmd. so instead of typing out &quot;wine progarm.exe&quot; I would call &quot;program.exe
72260
I can't figure out how to write the path of a folder that includes spaces in its name (in Terminal).  I tried:  cd /path/path/path/"A Folder"/file  cd /path/path/path/'A Folder/file  cd /path/path/path/A_Folder/file   but they all return the error through the terminal:  [command]: cannot access '/path/path/path/A Folder/file' No such a file or directory    I can still access it through steps like so:  cd /home cd user cd Desktop cd "Bash Programming" bash Example
106356
I'm trying to write a Windows cmd script to perform several tasks in series. However, it always stops after the first command in the script.  The command it stops after is a maven build (not sure if that's relevant).  How do I make it carry on and run each task in turn please?  Installing any software or configuring the registry etc is completely out of the question - it has to work on a vanilla Windows XP installation I'm afraid.  Ideally I'd like the script to abort if any of the commands failed, but that's a "nice to have", not essential.  Thanks.
36222
Assume Microsoft Office is installed. Consider the following batch file:  REM the following line successfully launches Microsoft Word start winword  REM none of the following commands work to launch Microsoft Word winword winword.exe winword.com winword.bat winword.cmd winword.vbs winword.vbe winword.js winword.jse winword.wsf winword.wsh winword.msc   What is it about the "start" instruction that allows the launching of Microsoft Word using the name "winword"?  My curiosity stems from my interest in the mechanics of the "start" verb - I don't need suggestions on other ways to start Microsoft Office.  Please don't suggest that I add the Microsoft Office directory to my PATH environment variable - I know what that would do.    How is start finding "winword" when cmd cannot find it directly?
112312
How do I create a windows application that does the following:   it's a regular GUI app when invoked with no command line arguments specifying the optional "--help" command line argument causes the app to write usage text to stdout then terminate it must be a single executable.  No cheating by making a console app exec a 2nd executable. assume the main application code is written in C/C++ bonus points if no GUI window is created when "--help" is specified.  (i.e., no flicker from a short-lived window)   In my experience the standard visual studio template for console app has no GUI capability, and the normal win32 template does not send its stdout to the parent cmd shell.