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
Including EXE in the bat file not working
-
- Posts: 2
- Joined: Tue Nov 03, 2009 3:48 pm
Fixed
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.
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.
-
- Site Admin
- Posts: 476
- Joined: Fri Feb 13, 2004 1:05 pm
-
- Posts: 3
- Joined: Thu Sep 03, 2009 6:44 pm
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.
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.
-
- Site Admin
- Posts: 476
- Joined: Fri Feb 13, 2004 1:05 pm
-
- Posts: 2
- Joined: Fri Mar 11, 2011 11:34 am
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.support wrote:Yes, we use APPDATA folder for embedded files.
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:
it should list mkisofs.exe if everything is fine. And, in effect, on my computer it outputsdir %MYFILES%\*.exe
which is OK. However, when running the same program on the Windows 2003 machine, the result is this: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
I also tried ECHOing %MYFILES% to see what happens:The system cannot find the path specified.
Morale ==> the %MYFILES% variable isn't set up correctly. This will lead my whole project not to run.C:\tmp>echo %MYFILES%
%MYFILES%
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]
-
- Posts: 2
- Joined: Fri Mar 11, 2011 11:34 am