PC Review


Reply
 
 
RedLars
Guest
Posts: n/a
 
      3rd Aug 2010
Opening a console window (click start->run and type "cmd") and typing
the following starts my application
DefineVariables.bat&&start /D%_HOME_APP% AMain.exe -ip 127.0.0.1

I would like to add this set of operations to a shortcut with a nice
looking icon so I tried modifying it slightly and insert the below
into a shortcut but it does not work.
%windir%system32\cmd.exe /K C:\dev\DefineVariables.bat&&start /D
%_HOME_APP% AMain.exe -ip 127.0.0.1

but then I get "Windows cannot find 'AMain.exe'. Make sure you typed
the name correctly, and then try again. To search for a file..."

Have tried using different parameters but it has not made any
difference.

Inside DefineVariables.bat _HOME_APP is defined like this
set _HOME_APP="%PROGRAMFILES%\Abb version2\bin"

Any ideas why this does not work?
 
Reply With Quote
 
 
 
 
Pegasus [MVP]
Guest
Posts: n/a
 
      3rd Aug 2010


"RedLars" <(E-Mail Removed)> wrote in message
news:e925cb09-d525-4dcc-8a36-(E-Mail Removed)...
> Opening a console window (click start->run and type "cmd") and typing
> the following starts my application
> DefineVariables.bat&&start /D%_HOME_APP% AMain.exe -ip 127.0.0.1
>
> I would like to add this set of operations to a shortcut with a nice
> looking icon so I tried modifying it slightly and insert the below
> into a shortcut but it does not work.
> %windir%system32\cmd.exe /K C:\dev\DefineVariables.bat&&start /D
> %_HOME_APP% AMain.exe -ip 127.0.0.1
>
> but then I get "Windows cannot find 'AMain.exe'. Make sure you typed
> the name correctly, and then try again. To search for a file..."
>
> Have tried using different parameters but it has not made any
> difference.
>
> Inside DefineVariables.bat _HOME_APP is defined like this
> set _HOME_APP="%PROGRAMFILES%\Abb version2\bin"
>
> Any ideas why this does not work?


You have too many extras in your command. Try this instead:

C:\dev\DefineVariables.bat & "%_HOME_APP%\AMain.exe" -ip 127.0.0.1

Note also:
- The single "&" operator. If you double it then the command that follows it
will only run if your batch file returns an %ErrorLevel% of 0.
- Double quotes inside a path should be avoided. You should therefore change
set _HOME_APP="%PROGRAMFILES%\Abb version2\bin"
to
set _HOME_APP=%PROGRAMFILES%\Abb version2\bin
so that you can surround the whole lot with double quotes.

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Execute Batch Command Automatically form Command Shell with Minlogon stuie_norris@yahoo.com.au Windows XP Embedded 1 21st May 2010 12:26 PM
Data shape command text contains a syntax error at or near position 106 in the command. Bob Microsoft Access ADP SQL Server 3 14th Apr 2008 09:43 PM
Pivot Table Error Message - "Command Text not set for command obje =?Utf-8?B?SmVmZiBEaXZpYW4=?= Microsoft Excel Misc 0 7th Nov 2007 10:26 PM
autorun.inf - shell\..\command with command line parameter doesn'twork kakii Windows XP Help 1 17th May 2007 08:54 PM
A resource kit command that allows the NET USER command to get info strictly from a specific container or OU =?Utf-8?B?Ym9vNzc3?= Microsoft Windows 2000 Active Directory 3 11th May 2004 08:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:43 PM.