Operating System - HP-UX
1827392 Members
4872 Online
109965 Solutions
New Discussion

Executing a UNIX script from Windows

 
SOLVED
Go to solution
Robin King_1
Regular Advisor

Executing a UNIX script from Windows

A collegue of mine needs to execute a script on one of our HP boxes using VB.
I can't work out the best way of doing this.

Can anyone help?
7 REPLIES 7
Ramkumar Devanathan
Honored Contributor
Solution

Re: Executing a UNIX script from Windows

Hi,

Probably you may install mks toolkit which is the korn shell for windows, or even cygwin (www.redhat.com/cygwin) which lets you run shell scripts on windows. then thro' vbscript you could open a shell and run this as /path/to/ksh <script name>.

i don't know the specifics on how to call this as i am not a vbscript guy. but i've seen this done before and it will work.

cygwin is free while mks requires a license.

- ramd.
HPE Software Rocks!
Geoff Wild
Honored Contributor

Re: Executing a UNIX script from Windows

Wow - that's quite a security issue...

Maybe, if you have Terminal server, you could allow the Windows machine to remsh to the unix box and execute the command....how you do it in VB - I don't know - unless it can pass a parameter to your telnet client?

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Ramkumar Devanathan
Honored Contributor

Re: Executing a UNIX script from Windows

http://www.cygwin.com/

http://www.mks.com/

sorry the redhat link is no longer valid.

- ramd.
HPE Software Rocks!
Darren Prior
Honored Contributor

Re: Executing a UNIX script from Windows

Hi,

There's a fair amount of sample code on the web for writing TCP/IP applications using winsock, so your colleague could write a telnet client and execute the script from there.

Here's a link to a VB sample source code site:

http://www.planet-source-code.com/vb

regards,

Darren.
Calm down. It's only ones and zeros...
Robin King_1
Regular Advisor

Re: Executing a UNIX script from Windows

Thanks people. Cygwin is used here, so I could point him that way. I too am more than slightly concerned about the security side of it, and without any VB experience it's hard to know what to suggest.

Apparently you can create macros in programmes like Reflections, but we are looking to remove telnet access to the boxes soon, so this seems a waste of time.
T. M. Louah
Esteemed Contributor

Re: Executing a UNIX script from Windows

Moreover .. any other os that needs to execute its binaries on a Unix machine .. is at least an "unnecessary effort" !!
VB uses Win32 API, at a lower level it is designed for PC/INTEL Hardware. HPUX runs on PA-RISC architecture & no "nonnative" code should run on it .. unless a new VB version is desinged for PA-RISC there IS NO way to make that happen.

For more information refer to:
"hp 9000 systems computer languages & tools" http://devrsrc1.external.hp.com/devresource/Tools/lang.html

For PA-RISC Info:
http://h21007.www2.hp.com/dspp/tech/tech_TechTypeListingPage_IDX/1,1704,10403,00.html

http://www.cpus.hp.com/technical_references/

Cheers,
T??


Little learning is dangerous!
Norman_21
Honored Contributor

Re: Executing a UNIX script from Windows

Hello,

Just my $.02 as usual. We have an application written by VB and installed and running in a Win98 Workstation. The Win98 Workstation has NFS (Network File system Services protocol installed and configured to access the HP-UX FS. The HP-UX FS are mapped within the Win98 environment. NFS could be shipped with Tiny Term emulation software supported by Windows OS.
Please refer to this link:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xb1085fe8b250d71190080090279cd0f9,00.html

Hope this help.
"Attitudes are contagious, is yours worth catching"/ My first point was given by SEP on January 31, 2003