Reputation: 231
I've created a simple program for moving files around in a system running win 7 embedded. I've run into a strange "bug" with my software and the way it handles startups.
static void Main(string[] args)
{
if (Flagger.GetFlag().Contains("Processing") || args.Contains("batch"))
{
Run();
}
return;
}
The way I've chosen to handle the different ways this program will be executed, I've created a simple way of seeing whether it is being executed as a part of the systems startup procedure, or called by a batch file.
The batch file is meant to be called by a trigger in the SQL-server and run a handful of programs for logging and such. While testing this on my workstation it executes and passes the parameters like it is supposed to do, but in the embedded system, no parameters is given to the program through the batch file.
start Pack.exe -batch
exit
I have tried several different methods of writing the batch file(with/without citation marks, start-exit) but to no avail. What could be causing the batch file to not pass the arguments to the Packer?
Upvotes: 1
Views: 673
Reputation: 4581
Starts a separate window to run a specified program or command.
START ["title"] [/Dpath] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
[/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
[/WAIT] [/B] [command/program]
[parameters]
Could it be, that you're passing qouted string as the first parameter to start command? If so, it handles it like a window title. Compare
start "c:\windows\notepad.exe"
and this
start "test" "c:\windows\notepad.exe"
Then you should just add a title param to start program. Also consider to use cmd /C instead.
Upvotes: 1