Jump to content

Command file with header


Recommended Posts

I'm trying to run this: 

$CMD = @ScriptDir & "\putty -ssh -pw pwd user@" & $Final & " -m " & @ScriptDir & "\Comandos\" & $Comando

This will execute a command file that look like this:

/etc/init.d/nfcepack_agente stop

/etc/init.d/nfcepack_agente start

 

But I'm trying to put some warning text...can I put some kind of comment header, turn the header into a var, and don't mess with the commands execution? something like:
 

$alert = FileRead(etc.txt,1)

 

 

#WARNING! This will stop the nfce services! Are you sure?

/etc/init.d/nfcepack_agente stop

/etc/init.d/nfcepack_agente start

 

 

Link to comment
Share on other sites

  • Moderators

Why not just throw a message box, with a Yes, No, Cancel, and execute only if they click Yes?

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...