Jump to content
Sign in to follow this  
Skinner

psexec & AutoIt = Black Window

Recommended Posts

Skinner

I've googled the hell out of this and everything says I'm going it right.

I have an autoit script, and for sake of argument, let's say it's just simply (of which I have tried):

MsgBox(0, "test", "Test Message")

When running:

psexec \\remotecomputer -c -f -i myscript.exe

From a machine on a domain running under a domain administrator account.

The script gets passed to the remote machine, and executes and even displays on the current logged in user's screen but it's a black box.

You can see the menu bar on the MsgBox but if I build a GUI with no bars or anything, it's just a black box.

Either way, menu bar or not, you can't see what's going on.

Any suggestions?

Share this post


Link to post
Share on other sites
JLogan3o13

Hi, Skinner, welcome to the forum. I'm afraid it is not clear what you're looking for. Are you trying to get it to interact with the logged on user? If so, this works for me:

$asset = InputBox("RegExport", "Enter the asset tag.")
$psexec = FileInstall("C:psexec.exe", "C:psexec.exe", 1)
DirCreate('' & $asset & 'C$MyReg')
ShellExecute("C:psexec.exe", '-i -s ' & $asset & ' REG EXPORT HKLMSoftwareODBC C:ODBC.reg', "", "", @SW_SHOW)

If you'd like it to happen silently, this works:

$asset = InputBox("RegExport", "Enter the asset tag.")
$psexec = FileInstall("C:psexec.exe", "C:psexec.exe", 1)
DirCreate('' & $asset & 'C$MyReg')
ShellExecute("C:psexec.exe", '-s ' & $asset & ' REG EXPORT HKLMSoftwareODBC C:ODBC.reg', "", "", @SW_HIDE)

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Skinner

It looks like the -s was the trick. Thanks for the help.

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  

×