Share your External Apps!

Get help with problems with mRemoteNG.

Re: Share your External Apps!

Postby tdiddi » Tue Jun 05, 2012 2:32 pm

Fantasyfr wrote:@SaltOfTheFlame & tdiddi: Why don't you use my little script? With it you can see all RMTSC Connection and can disconnect them.

Fantasyfr wrote:Application: Check Remoteconnection
Filename: check_remote.bat
Arguments: %HostName%
Code: Select all
@echo off & setlocal
IF "%1"=="" (
   GOTO MANUAL
 ) ELSE (
   GOTO AUTO
)
   
:AUTO
set IP=%1
qwinsta /server:%IP%
GOTO CHOICE

:MANUAL
set /p IP=Aktuelle IP oder Servernamen eingeben:
qwinsta /server:%IP%
GOTO CHOICE

:CHOICE
echo Auswahl:
echo [1] eine Verbindung trennen
echo [2] Beenden

SET /P auswahl=[1,2]?
for %%? in (1) do if /I "%auswahl%"=="%%?" goto DISCONNECT
for %%? in (2) do if /I "%auswahl%"=="%%?" goto ENDE
goto CHOICE

:DISCONNECT
set /p ID=Session ID eingeben:
rwinsta /server:%IP% %ID%

:ENDE
PAUSE



If you're interested i also have a newer script with psexec.


Nice script! Using it now. Thanks so much!
tdiddi
 
Posts: 2
Joined: Tue Oct 11, 2011 9:43 am

Re: Share your External Apps!

Sponsor
 

Re: Share your External Apps!

Postby Fantasyfr » Tue Jun 12, 2012 2:01 am

@tdiddi: You're welcome. I have a update for this script with psexec:

Code: Select all
@echo off & setlocal
IF "%1"=="" (
   GOTO MANUAL
 ) ELSE (
   GOTO AUTO
)
   
:AUTO
set IP=%1
set username=%2
set password=%3
Psexec \\%IP% qwinsta /server:%IP%
GOTO CHOICE

:MANUAL
set /p IP=Aktuelle IP oder Servernamen eingeben:
Psexec \\%IP% qwinsta /server:%IP%
GOTO CHOICE

:CHOICE
echo Auswahl:
echo [1] eine Verbindung trennen
echo [2] Beenden

SET /P auswahl=[1,2]?
for %%? in (1) do if /I "%auswahl%"=="%%?" goto DISCONNECT
for %%? in (2) do if /I "%auswahl%"=="%%?" goto ENDE
goto CHOICE

:DISCONNECT
set /p ID=Session ID eingeben:
Psexec \\%IP% rwinsta /server:%IP% %ID%


:ENDE
PAUSE
Fantasyfr
Moderator
 
Posts: 55
Joined: Mon Oct 11, 2010 10:54 pm

Re: Share your External Apps!

Postby anto538 » Sun Jul 15, 2012 1:31 am

Just an Update incase someone didnt mention it :)

Application: VMware Virtual Infrastructure Client
Filename: C:\Program Files\VMware\Infrastructure\Virtual Infrastructure Client\Launcher\VpxClient.exe
Arguments: --user %Username% --password %Password% --server %Hostname%

--Regards
Anto
anto538
 
Posts: 1
Joined: Sun Jul 15, 2012 1:28 am

Re: Share your External Apps!

Postby SidneyP » Wed Aug 08, 2012 3:27 am

Open remote D drive in explorer:

Filename: explorer
Arguments: \\%hostname%\d$

This unfortunately prompts me for user/pass, since we have separate administrative accounts for servers.
So I've been trying to do a 'net use' in a command prompt to map a drive, using the same credentials I have for the remote session:

Filename: cmd
Arguments: /k net use V: \\%HostName%\d$ /User:%domain%\%username% %password% && explorer v:

...but it doesn't always work... :?
SidneyP
 
Posts: 3
Joined: Tue Feb 14, 2012 6:37 am

Re: Share your External Apps!

Postby SidneyP » Wed Aug 08, 2012 3:45 am

...and I've just figured it out, using parts of another bat file:

Filename: C:\Tools\Bats\MremoteMapDrive.bat
Arguments: %HostName% %domain% %username% %password%

Code: Select all
@echo off

color 8F
Title Map drive...

SETLOCAL ENABLEEXTENSIONS

:Variables
   set ip=%1
   set drive=
   set letter=
   set user=%2\%3
   set pass=%4
   set remove=

:DriveP
   echo.
   echo Which remote drive do you want to map?
   set drive=D
   set /P drive="<Enter> for D:\ (Default) or type letter: "

:LetterP
   echo.
   echo Which local letter do you want to use?
   set letter=V
   set /P letter="<Enter> for V:\ (Default) or type letter: "

:RemoveDrv
   if exist %letter%:\*.* goto RemDrv2
   goto Map
:RemDrv2
   echo.
   echo Removing existing mapping...
   net use %letter%: /del

:Map
   echo.
   echo Attempting to map %letter%: to %drive%$ on %ip% as %user% ...
   echo.
   net use %letter%: \\%ip%\%drive%$ /user:%user% %pass%
REM   start explorer %letter%:
   Start C:\Tools\LessUs~1\xplore~1\XPLORE~1.EXE %letter%:
   goto CleanUp

:CleanUp
   pause
   echo.
   set /P remove="Would you like to delete this drive mapping now? (Y/N) [Y]:"
   if "%remove%"=="n" goto End
   net use %letter%: /del   
   echo.
   PING -n 1 127.0.0.1 >nul

:End
   echo.
   PING -n 1 127.0.0.1 >nul
SidneyP
 
Posts: 3
Joined: Tue Feb 14, 2012 6:37 am

Re: Share your External Apps!

Postby econwell » Fri Oct 26, 2012 11:02 am

Here is one that I have not seen anyone else post.

Display Name: COM
Filename: putty
Arguments: -serial com%Port%

This is nearly useless as a right-click External Tool

The way I use this is as part of a Connection to console in to switches

File --> New Connection
Name: Serial COMX
Protocol: Ext. App
External Tool: COM
Port: X

X is whatever com port you want
econwell
 
Posts: 2
Joined: Fri Oct 26, 2012 10:49 am

Re: Share your External Apps!

Postby amitz » Mon Nov 19, 2012 1:07 am

hi
is there a way to use net send or something similare to send messages to lan users with mremote?
i used purgos but the project is long gone...

thanks
Amir
amitz
 
Posts: 13
Joined: Thu Oct 28, 2010 4:23 am

Re: Share your External Apps!

Postby Fantasyfr » Tue Nov 20, 2012 2:21 am

amitz wrote:hi
is there a way to use net send or something similare to send messages to lan users with mremote?
i used purgos but the project is long gone...

thanks
Amir


i think i have something for you :-).

File: .\message.bat
Code: Select all
@echo off & setlocal
IF "%1"=="" (
   GOTO MANUAL
 ) ELSE (
   GOTO AUTO
)

:AUTO
set IP=%1
GOTO MESSAGE

:MANUAL
set /p IP=Aktuelle IP oder Servernamen eingeben:
GOTO MESSAGE

:MESSAGE
robocopy \\admin\tools\registry_settings\send_message \\%IP%\c$\registry_settings\send_message /MIR
\\admin\tools\PsTools\Psexec \\%IP% regedit /s c:\registry_settings\send_message\allowremoterpc_on.reg
set /p message=Bitte ihre Nachricht eingeben:
GOTO POWERSHELL

:POWERSHELL
powershell \\admin\tools\scripts\command.ps1

\\admin\tools\PsTools\Psexec \\%IP% regedit /s c:\registry_settings\send_message\allowremoterpc_off.reg
robocopy \\admin\tools\registry_settings\empty \\%IP%\c$\registry_settings /MIR

Pause


File: scripts\command.ps1
Code: Select all
[string]$myFile= "\\admin\tools\\scripts\Send-NetMessage.ps1"
Write-Output $myFile
. $myFile

Send-NetMessage -ComputerName $env:IP -Message "$env:message"


File: scripts\Send-NetMessage.ps1 Source: http://gallery.technet.microsoft.com/scriptcenter/Send-NetMessage-Net-Send-0459d235
Code: Select all
Function Send-NetMessage{
<#   
.SYNOPSIS   
    Sends a message to network computers
 
.DESCRIPTION   
    Allows the administrator to send a message via a pop-up textbox to multiple computers
 
.EXAMPLE   
    Send-NetMessage "This is a test of the emergency broadcast system.  This is only a test."
 
    Sends the message to all users on the local computer.
 
.EXAMPLE   
    Send-NetMessage "Updates start in 15 minutes.  Please log off." -Computername testbox01 -Seconds 30 -VerboseMsg -Wait
 
    Sends a message to all users on Testbox01 asking them to log off.   
    The popup will appear for 30 seconds and will write verbose messages to the console. 
 
.EXAMPLE
    ".",$Env:Computername | Send-NetMessage "Fire in the hole!" -Verbose
     
    Pipes the computernames to Send-NetMessage and sends the message "Fire in the hole!" with verbose output
     
    VERBOSE: Sending the following message to computers with a 5 delay: Fire in the hole!
    VERBOSE: Processing .
    VERBOSE: Processing MyPC01
    VERBOSE: Message sent.
     
.EXAMPLE
    Get-ADComputer -filter * | Send-NetMessage "Updates are being installed tonight. Please log off at EOD." -Seconds 60
     
    Queries Active Directory for all computers and then notifies all users on those computers of updates.   
    Notification stays for 60 seconds or until user clicks OK.
     
.NOTES   
    Author: Rich Prescott   
    Blog: blog.richprescott.com
    Twitter: @Rich_Prescott
#>
 
Param(
    [Parameter(Mandatory=$True)]
    [String]$Message,
     
    [String]$Session="*",
     
    [Parameter(ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True)]
    [Alias("Name")]
    [String[]]$Computername=$env:computername,
     
    [Int]$Seconds="5",
    [Switch]$VerboseMsg,
    [Switch]$Wait
    )
     
Begin
    {
    Write-Verbose "Sending the following message to computers with a $Seconds second delay: $Message"
    }
     
Process
    {
    ForEach ($Computer in $ComputerName)
        {
        Write-Verbose "Processing $Computer"
        $cmd = "C:\Windows\Sysnative\msg.exe $Session /Time:$($Seconds)"
        if ($Computername){$cmd += " /SERVER:$($Computer)"}
        if ($VerboseMsg){$cmd += " /V"}
        if ($Wait){$cmd += " /W"}
        $cmd += " $($Message)"
 
        Invoke-Expression $cmd
        }
    }
End
    {
    Write-Verbose "Message sent."
    }
}


file: registry_settings\send_message\allowremoterpc_off.reg
Code: Select all
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server]
"AllowRemoteRPC"=dword:00000000


file: registry_settings\send_message\allowremoterpc_on.reg
Code: Select all
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server]
"AllowRemoteRPC"=dword:00000001


i hope i could help you :-).

best geards

Frank
Fantasyfr
Moderator
 
Posts: 55
Joined: Mon Oct 11, 2010 10:54 pm

Re: Share your External Apps!

Postby amitz » Wed Dec 19, 2012 5:30 am

thanks
but how do i use it?
amitz
 
Posts: 13
Joined: Thu Oct 28, 2010 4:23 am

Re: Share your External Apps!

Postby vuncle » Wed Jan 30, 2013 6:45 am

luma wrote:
mpullen wrote:re: launching VMWare-- have you had any luck integrating VMWare client vs. just launching it? If so, please clue me in!

Thanks,
Mike


The problem is that anything that throws up a dialog box before launching the main UI won't integrate - so no luck with the VI client.


I read these two post and tried to enhance my way of dealing with my VMware hosts.

The way I was working until now :

- A toolbar with 1 shortcut to VIclient for each hyperviser host (free license) and a shortcut to VIclient for my vcenter server ( "C:\Program Files (x86)\VMware\Infrastructure\Virtual Infrastructure Client\Launcher\VpxClient.exe" -s "server" -u "user" -p "passwd" ). Unfortunately this way of working was registering the passwords non encrypted ... :(

Now, I added Vi Client as an external tool, and as argument : -s %hostname% -u %username% -p %password%

My passwords are now encrypted, and I have reduced my interfaces to connect to servers :)

And that works fine ( don't try to integrate ... but, is that really needed ? ;) )
vuncle
 
Posts: 1
Joined: Wed Jan 30, 2013 6:31 am

PreviousNext

Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests

cron