Source language: Translate to:

The system cannot find the file specified

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

The system cannot find the file specified

Postby wzp » Sat Sep 24, 2011 12:45 pm

I got problem, when I publish compiled exe and move to another PC, and to run any command I get error - "Error The system cannot find the file specified". So how can I compile external windows applications (.exe or .bat files) so that they can run on any other place I mean PC ?

(p.s. Im creating software that is going to convert wav to mp3 files so I need to compile small wav2mp3.exe file with gui that i created in Neo)
wzp
 
Posts: 10
Joined: Fri Jan 07, 2011 9:46 pm

Postby dec » Sat Sep 24, 2011 1:16 pm

Hi,

Repeat with me: "Never, never, never use a file path that only exists on my computer". But don't worry: this is a common need and have almost two basic solutions.

1º Refer to your publication directory

NeoBook provide a global variabled named "[PubDir]", wich ever contain the directory path of your publication executable file. So, if you need to read a file containing on a subfolder "documents" placed on your publication executable file folder, you never refer to this file using the path on your computer, but doing something like this:

Code: Select all
SetVar "[MyDocPath]" "[PubDir]documents\mydoc.txt"


So dont matter where your publication is, on what computer, in a disk, a USB, a CDROM, etc. You ever can use "[PubDir]documents\mydoc.txt" to refer to a "mydoc.txt" file, under "documents" subfolder of your publication executable file folder.

2º Use the Windows "common" directories

You also may need to know where some common files an folder are placed. And you cannot assume that Windows main directory is ever on "C:\Windows", because some people can install Windows (rarelly, but possible) in other unit, for example "D:\Windows".

NeoBook also provide a global variable for this directory: "[WindowsDir]". So you can use this variable in order to know where the Windows directory is. Another variables are availables, like "[TempDir]", "[SystemDir]", etc. (you can view the NeoBook help, looking for Global variables > Folders) in order to know the path for various Windows common directories.

Hope this can help you in some way. ;)
.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Postby wzp » Sat Sep 24, 2011 2:21 pm

Well I dont want that those external files to be as part of main exe, can they be all compiled like text, pictures files inside compiled exe from Neo?
wzp
 
Posts: 10
Joined: Fri Jan 07, 2011 9:46 pm

Postby dec » Sun Sep 25, 2011 1:54 am

Hi,

Take a look at the NeoBook help section "Embedded Files" and, in general, search the help with the "embedded" query word.
.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Postby smartmedia » Sun Sep 25, 2011 2:35 am

Hi..

In general, read the help, at most of the times you will find your answer there. Help is written in very simple way and if you are in the beginning learning NB could be very useful.
User avatar
smartmedia
 
Posts: 889
Joined: Fri Apr 01, 2005 6:50 am
Location: Hellas

Postby Neosoft Support » Mon Sep 26, 2011 10:36 am

Well I dont want that those external files to be as part of main exe, can they be all compiled like text, pictures files inside compiled exe from Neo?


An exe file must be visible to Windows in order to run. The exe must be extracted at least temporarily while it is running.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 0 guests

cron