Sign in to follow this  
Followers 0
MikeJohansen

Shellexecute syntax with constant

4 posts in this topic

What is the correct syntax to make a shellexecute command with a constant string text.

ShellExecute("cmd",'/k at ' & $iConstHib & 'Shutdown /h')

This does not work apparently

Any thoughts ?

Share this post


Link to post
Share on other sites



Hi Mike,

try the following.. Note: cmd replaced with @ComSpec and a space before the Shutdown command
 
ShellExecute(@ComSpec,'/k at ' & $iConstHib & ' Shutdown /h')

Share this post


Link to post
Share on other sites

Hahaha i must be stressed, i totally forgot to put a space before Shutdown...... oh well thanks for your help Seeker :)

Share this post


Link to post
Share on other sites

You will also need a space before the /k  

ShellExecute(@ComSpec,' /k at ' & $iConstHib & ' Shutdown /h')

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
Sign in to follow this  
Followers 0