Prevent appearence of my batch file in TEMP folder

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
hacker
Posts: 6
Joined: 29 Aug 2014 06:21

Prevent appearence of my batch file in TEMP folder

#1 Post by hacker » 29 Aug 2014 08:47

Hi

I have wrote a program with batch file and I compile it with Quick Batch File Compiler software.
however, when I run my file, a sample of my file appears in the TEMP folder .
Now I would like to prevent appearance of my file in the TEMP folder.

Please help me in this regard.
thanks in advance.
Last edited by hacker on 30 Aug 2014 01:06, edited 3 times in total.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Prevent appearence of my batch file in TEMP folder

#2 Post by foxidrive » 29 Aug 2014 08:57

That is how batch compilers work.

They create a temporary copy of the batch file, execute it and then delete it.

ShadowThief
Expert
Posts: 1166
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: Prevent appearence of my batch file in TEMP folder

#3 Post by ShadowThief » 29 Aug 2014 09:07

You can add the line

Code: Select all

attrib +h +s %0


to the beginning of your script and

Code: Select all

attrib -h -s %0


to the end of your script.

Users will still be able to see the script if they can see hidden and system files, but most users don't have those two options enabled.

aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Prevent appearence of my batch file in TEMP folder

#4 Post by aGerman » 29 Aug 2014 10:33

There is no Batch "Compiler" at all. Batch is a scripting language that cannot be compiled. The way such software works is that it packs your Batch file into a container. To execute it you have to unpack it first.
The consequence of your requirement would be to learn a compilable programming language...

Regards
aGerman

ShadowThief
Expert
Posts: 1166
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: Prevent appearence of my batch file in TEMP folder

#5 Post by ShadowThief » 29 Aug 2014 22:09

aGerman wrote:There is no Batch "Compiler" at all. Batch is a scripting language that cannot be compiled. The way such software works is that it packs your Batch file into a container. To execute it you have to unpack it first.
The consequence of your requirement would be to learn a compilable programming language...

Regards
aGerman

ExeScript Editor markets itself as more of a code obfuscator/self-executing wrapper.

Post Reply