Abyssmedia.com Forum Index Abyssmedia.com
Abyssmedia Support Forums
 
  FAQ    Search    Memberlist    Usergroups   Register 
  Profile    Log in to check your private messages    Log in 

Including EXE in the bat file not working

 
Post new topic   Reply to topic    Abyssmedia.com Forum Index -> Quick Batch File Compiler
View previous topic :: View next topic  
Author Message
kn1dmay1



Joined: 03 Nov 2009
Posts: 2

PostPosted: Tue Nov 03, 2009 3:55 pm    Post subject: Including EXE in the bat file not working Reply with quote

I am trying to include the exe file that the batch file is running in the compiled exe. Here is the batch file and psshutdown is the exe.

psshutdown -r -f -t 1 -u username -p password \\computername

I tried it as %MYFILES%\psshutdown.exe and with both start and call in front of it and it seems to not see psshutdown.exe in %MYFILES%

If I leave the psshutdown.exe in the same place as when I added it in the Compiler it works but I want this to be self supporting so I do not have to send the psshutdown.exe with the batch file.

Any suggestions?

Thanks
Back to top
kn1dmay1



Joined: 03 Nov 2009
Posts: 2

PostPosted: Tue Nov 10, 2009 8:10 pm    Post subject: Fixed Reply with quote

I fixed it by placing

C:\DOCUME~1\%USERNAME%\"Local Settings"\"Application Data"\

in front of the exe file and it worked.

You guys should really document the %MYFILES% better and also make it where you can set it to whatever path you want.
Back to top
support
Site Admin


Joined: 13 Feb 2004
Posts: 378

PostPosted: Fri Nov 20, 2009 10:57 pm    Post subject: Reply with quote

Current version always use long file names, so you need to add quotes:

call "%MYFILES%\psshutdown.exe"
Back to top
blasch



Joined: 03 Sep 2009
Posts: 3

PostPosted: Sat Feb 20, 2010 8:16 pm    Post subject: Reply with quote

the long file names now affects %myfiles% calls in for loops...

still testing how to get around this...

bummer is I cannot update about 20 scripts until I figure this out.

Looks like you are pulling the APPDATA variable and mapping it to %Myfiles%

just a thought here, can you extract to a interative folder in appdata like qfb.000 qfb.001 etc... that way you can run multiple iterations of scripts that call %myfiles% and not step on the first scripts files.
Back to top
support
Site Admin


Joined: 13 Feb 2004
Posts: 378

PostPosted: Tue Feb 23, 2010 10:18 pm    Post subject: Reply with quote

Yes, we use APPDATA folder for embedded files.
Back to top
paolone



Joined: 11 Mar 2011
Posts: 2

PostPosted: Fri Mar 11, 2011 3:57 pm    Post subject: Reply with quote

support wrote:
Yes, we use APPDATA folder for embedded files.


I'm not sure it really works on all NT-derived Windows version. I've already sent to support email address my concerns and suggestions, since I have a similar issue with a batch file I am trying to compile.

1. What I am trying to do

write a single program which accepts a path and a name file, and then uses embedded mkisofs.exe program to create a ISO.

2. My issues

A) I can get the program running on my 64-bit Windows 7 machine only by placing the %MYFILES% path under commas.

This way it works:
"%MYFILES%"\mkisofs.exe -o %2 -D -R -J ... etcetera

but if i just place
%MYFILES%\mkisofs.exe -o %2 -D -R -J ...
it doesn't

B) if I move my program to a server using Windows 2003 Server (which is basically the server version of Windows XP), it just doesn't work.

I added this debug line to my batch file:

Quote:
dir %MYFILES%\*.exe


it should list mkisofs.exe if everything is fine. And, in effect, on my computer it outputs

Quote:
Directory di C:\Users\paolone\AppData\Local

11/03/2011 12:22 128.512 mkisofs.exe
1 File 128.512 byte
0 Directory 47.030.542.336 byte disponibili


which is OK. However, when running the same program on the Windows 2003 machine, the result is this:

Quote:
The system cannot find the path specified.


I also tried ECHOing %MYFILES% to see what happens:

Quote:
C:\tmp>echo %MYFILES%
%MYFILES%


Morale ==> the %MYFILES% variable isn't set up correctly. This will lead my whole project not to run.

In my email I suggest to Abyssmedia a simple solution: Instead of use Windows' paths like /local/application-data or /appdata/etc, just

mkdir %USERPROFILE%/QBFTMP0000
set %MYFILES% %USERPROFILE%/QBFTMP0000

execute the script and then

rmdir %USERPROFILE%/QBFTMP0000

this should work on any version of Windows, starting from NT and upwards.


But if I am wrong, please tell me where and how to fix this, and I will be really happier.[/quote]
Back to top
paolone



Joined: 11 Mar 2011
Posts: 2

PostPosted: Fri Mar 11, 2011 4:29 pm    Post subject: Reply with quote

I've run the same project as-is on another Windows 2003 machine... and it works. Shocked

Astonishing.

I should look at permissions on the first machine, I think...
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Abyssmedia.com Forum Index -> Quick Batch File Compiler All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001-2011 phpBB Group