Sign in to follow this  
Followers 0
BullGates

Using nircmd commands on autoit

1 post in this topic

Hello,

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"
#ce

; 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)

Sleep(10000)
; 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  
Followers 0