Jump to content
Sign in to follow this  

Using nircmd commands on autoit

Recommended Posts



This should be posted on the examples scripts, but I can't post it there. I could only found one post mentioning this great nircmd.dll library, giving the greatest functionalities of nircmd to AutoIt users in a very simple and effective way.

Refer to the Nircmd utility documentation for all the available commands

; to run a nircmd script file:
$cmd = "script script.ncl"
DllCall("nircmd.dll", "int", "DoNirCmd", "str", $cmd)
#cs save the next sample content in script.ncl on the same directory as nircmd.dll:
    infobox "Hello !" "This is the first message"
    infobox "Hello !" "This is the second message"
    infobox "Hello !" "This is the third message"

; to open the nirsoft page using the shell open command:
$cmd = "shexec ""open"" ""http://www.nirsoft.net/cmp/nircmd.html"""
DllCall("nircmd.dll", "int", "DoNirCmd", "str", $cmd)

; stop spooler service:
$cmd = "service stop Spooler"
DllCall("nircmd.dll", "int", "DoNirCmd", "str", $cmd)

; start spooler servicet:
$cmd = "service start Spooler"
DllCall("nircmd.dll", "int", "DoNirCmd", "str", $cmd)

Have fun!

[topic="51913"]Restrict USB Storage usage to group membership[/topic] * [topic="48699"]Using nircmd library[/topic] * Some admin notes

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.