Hi frnds, I want to run Multiple Skype .I have used the foll. code. But its not working. Ca somebody help me in getting out where I M wrong

Steps-

1. right click on the desktop, select new/text document
2. name it Skype2.bat
3. right click skype2.bat, select /edit
4. paste in
%windir%\system32\RUNAS.exe /profile “/user:Administrator″ /savecred “C:\Program Files\Skype\Phone\Skype.exe”
(‘Administratort’ is the account name)
5. Save. you’re done.

I want to ask that suppose there are two accounts Administrator & other account name is sonia.
Each time I have to replace the account name in the above statement.

Recommended Answers

All 7 Replies

Yes it is relevant to VB.Net

....

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim windir As String
        Dim Uname As String

        windir = Environ("windir")
        Uname = InputBox("Enter The Name")

        Shell(windir & "\system32\RUNAS.exe /profile /user:" & Uname & " /savecred C:\Program Files\Skype\Phone\Skype.exe", AppWinStyle.NormalFocus, False)

        End
    End Sub
End Class

Instead of all that (I'm just assuming I know what you are talking about... your description for help was very unclear), you could simply make a file called something like "RunIt.vbs" and add this:

dim Wsh
dim objEnv
dim windir
dim Uname

set wsh = WScript.createobject("WScript.Shell")
set objEnv = wsh.environment("Process")

windir = objEnv("Windir")

uname = inputbox("Enter The Name")

wsh.run windir & "\system32\RUNAS.exe /profile /user:" & Uname & " /savecred C:\Program Files\Skype\Phone\Skype.exe", 1, 0

set wsh = nothing
set objEnv = nothing

Wscript.Quit()

Sory for that My description for help was not clear. Hii Camose, When i enter name in Inputbox,No Skype Account is opened. Plz check it out.

The code works perfect for opening other EXE's.... does it open skype at all?

Here's a fixed code (at least works in my comp):

dim Wsh
dim objEnv
dim windir
dim Uname

set wsh = WScript.createobject("WScript.Shell")
set objEnv = wsh.environment("Process")

windir = objEnv("Windir")

uname = inputbox("Enter The Name")

wsh.run windir & "\system32\RUNAS.exe /profile /user:" & Uname & " /savecred "  & """C:\Program Files\Skype\Phone\Skype.exe""", 1, 0

set wsh = nothing
set objEnv = nothing

Wscript.Quit()

Since exe-name has a space, it must be enclosed in double quotes.

I noticed also that if you have a space in an account name, you have to enclose it in quotes, like "COMP ADMIN".

commented: Nice Job Teme64 +8

:$ Oops.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.