Sign in to follow this  
Followers 0
Iznogoud

Simple form for making a connection to different pc

12 posts in this topic

Hi, i was wondering if it was possible to make a form wich our company logo and 2 drop down fields.

Wich can read a directory where some files are. First i shall explain why i want to do this

Why:

We can support alot of our customers with remote desktop for checking different things. If i want to connect to a server i have to look up the documentation etc for the ip adress etc.

What i want to do:

Making a shortcut for Remote Desktop like "c:\windows\system32\mstsc.exe -v:"<server> /console /f" for each Server/PC we can take over.

And to orginise this i want to make a form with 2 pull down fields where you can select in the first field the company name and in the second field the Servers/PC's wich are available for Remote Desktop.

Is this possible? Can i with your support create such form, even if i am a big noob to autoit scripting.

I have made some simple scripts wich make installations of software automatic, but i think i don't have the knowledge to create this one without help.

Share this post


Link to post
Share on other sites



Here is my solution:

mstsc.au3

mstsc.ini:

[Company1]Server1=10.10.10.101

User1=10.10.10.102

[Company2]

Server2=10.10.10.201

User2=10.10.10.202

[Company3]

Server3=10.10.10.301

User3=10.10.10.302

Notes:

- in button Connect instead of Run() is MsgBox() -> Run() is commented (for debug/testing)

- I don't know how to disable editing Combo "by hand"

- name of PC must not include character "="

which is used as delimiter between name and adress of PC

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hi Iznogoud,

I will like to help you with the script, I believe it will be a good learning experience but English is my second language and I don't understant exactly what do you want to do. Instep of shortcut you could try to make the RDP file and then used AutoIt to run the RDP file.

Something like this: Run(@ComSpec & ' /k "' & @ScriptDir & '\CompanyName.rdp"' , '', @SW_HIDE)

Take a look to this Webpage

I hope this get you started...

Edited by Danny35d

AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line

Share this post


Link to post
Share on other sites

Here is my solution:

mstsc.au3

mstsc.ini:

Notes:

- in button Connect instead of Run() is MsgBox() -> Run() is commented (for debug/testing)

- I don't know how to disable editing Combo "by hand"

- name of PC must not include character "="

which is used as delimiter between name and adress of PC

As far as the Combo box goes you should be able to use the $ES_READONLY to make it read only. I cannot right now remember how I have done this in the past. I will try and dig up an old script to see.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

As far as the Combo box goes you should be able to use the $ES_READONLY to make it read only. I cannot right now remember how I have done this in the past. I will try and dig up an old script to see.

JS

Style ES_READONLY was first what I tried, but no luck. It's not working as I expected.

Today I first time tried using ComboBox.

I take this task to learn something new B)

Share this post


Link to post
Share on other sites

Sorry but $CBS_DROPDOWNLIST was my second attempt, but also didn't work B)

I don't know how to make it (disable "by hand" editing in ComboBox) ...

The example you posted is already a good one, but maybe we could make it even better.

What i am just wondering is that if it is possible to read the shortcuts from a directory?

So you got this folder layout

Company1

-Server1

Company2

-Server1

-Server2

Company3

-Workstation1

etc.

Can this folder layout be read out and put it in the combo box?

I don't know how difficult it would be and if it is even possible, thats why i wanna discuss it with you people.

Share this post


Link to post
Share on other sites

The example you posted is already a good one, but maybe we could make it even better.

What i am just wondering is that if it is possible to read the shortcuts from a directory?

So you got this folder layout

Company1

-Server1

Company2

-Server1

-Server2

Company3

-Workstation1

etc.

Can this folder layout be read out and put it in the combo box?

I don't know how difficult it would be and if it is even possible, thats why i wanna discuss it with you people.

Just take my example as start point for your work on changes which satisfy your needs B)

Share this post


Link to post
Share on other sites

Just take my example as start point for your work on changes which satisfy your needs B)

As i said before thats a good starting point, but is it possible to read the shortcuts from out a directory?

for an example:

If there is a new connection wich must be addes you have to edit the script and compile it again.

Share this post


Link to post
Share on other sites

As i said before thats a good starting point, but is it possible to read the shortcuts from out a directory?

for an example:

If there is a new connection wich must be addes you have to edit the script and compile it again.

I didn't understand your previous post, so I wrote what I wrote.

But if you have new connection, only add it to INI file (script stays unchanged)...

Share this post


Link to post
Share on other sites

I didn't understand your previous post, so I wrote what I wrote.

But if you have new connection, only add it to INI file (script stays unchanged)...

I think i am getting the point now B)

I will try some things from your script out, and see if its possible.

Thx for you 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  
Followers 0