Jump to content
Sign in to follow this  
zac23

auto-MSTSC

Recommended Posts

zac23

Hi,

So i got this script

MSTSC()
Func MSTSC()
    Run("MSTSC.EXE")
    Sleep(500)
    Send("10.1.1.3" & "{enter}")
EndFunc

Exit

its very simple and works when i run the script, but when i compile it something goes wrong,

it opens up hundreds of mstsc processes and prety much crashes the PC, what do i need to add to stop this happening?

Helpfile search keywords or any tips would be much apriciated.

Thanks for any help,

Zac,


Share this post


Link to post
Share on other sites
zac23

Did you try compile it? haha coz i did twice and theres something in the includes

that it adds when you compile that is messing it up,

EDIT: i tried again same result

Edited by zac23

Share this post


Link to post
Share on other sites
water

Works fine for me. I'm running AutoIt 3.3.0.0 on Windows XP SP 2. I did the compile from SciTe using F7 (build) and Ctrl-F7 (compile) with obfuscator.

When running obfuscator I get message "Aut2exe.exe ended errors because the target exe wasn't created, abandon build.rc:9999"

I tried 3.3.1.1 Beta (without obfuscator) and it works fine as well!

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
herewasplato

I do not think that you will need @ComSpec.

What is wrong with running the MSTSC.EXE directly?

Or even Shellexecute the rdp file...


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites
herewasplato

... it opens up hundreds of mstsc processes and prety much crashes the PC, what do i need to add to stop this happening? ...

Try naming your compiled script something other than mstsc.exe

Edit: Or if this were Jeopardy - my answer in the form of a question would be:

Did you name your compiled script mstsc.exe?

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites
spudw2k
zac23

Try naming your compiled script something other than mstsc.exe

Edit: Or if this were Jeopardy - my answer in the form of a question would be:

Did you name you compiled script mstsc.exe?

Thanks herewasplato i was nameing it mstsc and thts what was causeing the script to go crazy

god im a noob haha,

thanks everyone for the help,

Zac,


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.