Jump to content
patrick99

Run in different extension

Recommended Posts

patrick99

Hello,

Can you please help me with this issue

I want to run file.bin to file.bat

ShellExecute("file.bin, file.bat")

Thank you

Share this post


Link to post
Share on other sites
Nessie

So what is the question? Can you explain yourself better?


My UDF: NetInfo UDF Play with your network, check your download/upload speed and much more! YTAPI Easy to use YouTube API, now you can easy retrive all needed info from a video. NavInfo Check if a specific browser is installed and retrive other usefull information. YWeather Easy to use Yahoo Weather API, now you can easily retrive details about the weather in a specific region. No-IP UDF Easily update your no-ip hostname(s).

My Script: Wallpaper Changer Change you wallpaper dinamically, you can also download your wallpaper from your website and share it with all!   My Snippet: _ImageSaveToBMPConvert an image to bmp format. _SciteGOTO Open a file in SciTE at specific fileline. _FileToHex Show the hex code of a specified file

Share this post


Link to post
Share on other sites
Jos
14 minutes ago, patrick99 said:

I want to run file.bin to file.bat

I am not sure what you are asking for. How would you type the command when running it manually in the CMD prompt?

Jos


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
patrick99

I want that it will change the extension to .bat and execute it

Share this post


Link to post
Share on other sites
patrick99

KVv4iwx.jpg

Share this post


Link to post
Share on other sites
patrick99

Reading file.bit as file.bat

Share this post


Link to post
Share on other sites
Jos

Understood that much but simply do not understand what that bin file is supposed to be. Why isn't it a bat file already and what is the content of it?

Jos


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
patrick99

The file.bin is originally a .bat

Share this post


Link to post
Share on other sites
patrick99

For hiding the batch script

Share this post


Link to post
Share on other sites
patrick99

Script for using for the icloud

 

Share this post


Link to post
Share on other sites
Jos
Posted (edited)

Ok, now I understand. So you will have to either rename or copy the file to a bat file before running it and then change it back.

... but why the need for bat file at all and not simply use AutoIt3?

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
patrick99

Yes but just i don't want that they found the real .bat because it includ the udid informations

Share this post


Link to post
Share on other sites
patrick99
Quote

... but why the need for bat file at all and not simply use AutoIt3?

I don't know much on the AutoIt3 

I can just use the batch ,Buyers give me the udid ,I include it in the batch code and i give them ,but if they opened by notepad they can change the udid for them self 
 

Quote

 

Rename  the file to a bat file before running it and then change it back.


 

I like this idea can you please help me with this

Share this post


Link to post
Share on other sites
Jos
Posted (edited)

Understand, so that is why I said to temporarily rename it or copy it.

8 minutes ago, patrick99 said:

I like this idea can you please help me with this

Help or code it for you? :)

Something like this (untested):

#include<File.au3>
Local $temp_bat = _TempFile(@TempDir, "~", ".bat")
FileCopy("file.bin",$temp_bat,1)
ShellExecuteWait($temp_bat)
FileDelete($temp_bat)

Jos

Edited by Jos
Fixed file extension to BAT
  • Thanks 1

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
patrick99
4 minutes ago, Jos said:

Understand, so that is why I said to temporarily rename it or copy it.

Help or code it for you? :)

Something like this (untested):

#include<File.au3>
Local $temp_bat = _TempFile(@TempDir, "~", ".au3")
FileCopy("file.bin",$temp_bat,1)
ShellExecuteWait($temp_bat)
FileDelete($temp_bat)

Jos

Thanks it's work great 

Share this post


Link to post
Share on other sites
patrick99

Yes thank you i understated  

(@TempDir, "~", ".au3")

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×