Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to open mainframe session in VBA

Status
Not open for further replies.

laks143

Programmer
Apr 20, 2009
20
GB
I want to open mainframe session through VBA.Can any one tell me how to do this.
PCSWS.EXE is placed on Desktop.


Thanks In Advance !!!
Lakshmi.
 
Code:
Set WSHSHell = CreateObject("Wscript.Shell")
pathToDesktop = WSHShell.SpecialFolders("Desktop")
WSHShell.Run (pathToDesktop & "PCSWS.EXE")

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Hi Mark ,

Set WSHShell = CreateObject("Wscript.Shell")
pathToDesktop = WSHShell.SpecialFolders("C:\Documents and Settings\1055214\Desktop")
WSHShell.Run (pathToDesktop & "PCSWS.exe")


the code that you gave is working fine
I have given the ip address in the link parameters and i have saved PCSWS.EXE as mainframe.After executing this code it is creating new session and it is asking link parameters . i dont wat this to be happened.
 
Hi Mark ,

Set WSHShell = CreateObject("Wscript.Shell")
pathToDesktop = WSHShell.SpecialFolders("C:\Documents and Settings\1055214\Desktop")
WSHShell.Run (pathToDesktop & "PCSWS.exe")


the code that you gave is working fine
I have given the ip address in the link parameters and i have saved PCSWS.EXE as mainframe.After executing this code it is creating new session and it is asking link parameters . i dont want this to be happened.
 
What the heck did yo do to the desktop path? The code I provided FINDS the desktop dynamically.

What command can you execute from a command prompt to launch the program the way you want? That is what you need to code.

Try executing PCSWS /? to see what the parameters are for it.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top