I'm a ****ie of Samurize...I don't know how to create "Instance foobariPod" for the FoobariPod script...Can anyone help me... ![]()
[help} How To Open A New "instance"
i just make a topic to know how to close an instance ![]()
there is the Tadis script to open an instance ![]()
just make a text file with this:
Set WshShell = WScript.CreateObject("WScript.Shell")
set oShell = CreateObject("Shell.Application")
strSamPath = WshShell.RegRead ("HKCUSoftwareSerious SamurizeGeneralDirPath")
SAMURIZE_DIRECTORY = strSamPath
KillClient
Wscript.sleep (100)
Set oExec = WshShell.Exec(SAMURIZE_DIRECTORY & "Client.exe " & """instance name""")
Set oExec = Nothing
Set WshShell = Nothing
Function KillClient
Dim objWMIService, colProcessList, objProcess, PID
Set objWMIService = GetObject("winmgmts:.rootcimv2")
Set colProcessList = objWMIService.ExecQuery("select * from Win32_Process where CommandLine LIKE '%Client.exe%" & "instance name" & "%'")
For Each objProcess in colProcessList
PID = objProcess.ProcessID
killPID(PID)
Next
End Function
Function killPID(PID)
Dim WshShell
Set WshShell = CreateObject("wscript.shell")
WshShell.run "taskkill /PID " & PID, 0
End Function
rename it open instance name.vbs and it'll work ![]()
...or just run : "C:\Program Files\Samurize\Client.exe" "instance name" ...
in your case that would be : "C:\Program Files\Samurize\Client.exe" "foobariPod"
O~thanks for your help~crni and Derek~ ![]()
Aqua-Soft Forums