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.

....

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.

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".

Comments
Nice Job Teme64
This article has been dead for over six months. Start a new discussion instead.