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

Exe with Parameter

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



Joined: 05 Nov 2015
Posts: 3

PostPosted: Sat Nov 14, 2015 1:28 am    Post subject: Exe with Parameter Reply with quote

How to create an exe, to accept what parameters



the batch accepts the parameters so

Code:
@echo off
SET var=%~dp0
SET var1=%1%
SET var2=%2%
SET var3=%3%
SET var4=%4%
SET var5=%5%
SET var6=%6%
SET var7=%7%


as soon as I want to compile it into an exe, does not work

please give me an example
Back to top
support
Site Admin


Joined: 13 Feb 2004
Posts: 376

PostPosted: Thu Nov 26, 2015 8:13 am    Post subject: Re: Exe with Parameter Reply with quote

what exactly doesn't work?
variable return wrong result?
Back to top
schlawiner



Joined: 05 Nov 2015
Posts: 3

PostPosted: Tue Dec 08, 2015 11:50 pm    Post subject: Reply with quote

the batch takes over the variables, the exe not
Back to top
support
Site Admin


Joined: 13 Feb 2004
Posts: 376

PostPosted: Wed Dec 09, 2015 5:25 am    Post subject: Reply with quote

If you CALL compiled file from another application then all variables will be lost.
All batch scripts executed in the single process, EXE files - independed processes.
Back to top
schlawiner



Joined: 05 Nov 2015
Posts: 3

PostPosted: Mon Dec 14, 2015 2:01 am    Post subject: Reply with quote

How can we solve the problem to make it work
Back to top
support
Site Admin


Joined: 13 Feb 2004
Posts: 376

PostPosted: Tue Jan 26, 2016 1:39 am    Post subject: Reply with quote

Have you used this valiables in the same script?
Add echo commands for debugging.

For me, this script work correct after compilation:

SET var1=%1%
ECHO %var1%
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