Page 1 of 1 1
Topic Options
#16151 - 2002-01-14 07:13 PM Using a shell command with a variable
RalphG Offline
Fresh Scripter

Registered: 2002-01-14
Posts: 11
Loc: CH
hello

I have the following, small question:

<>
SELECT
CASE (@INWIN = 1) AND (@DOS >= 5) $OSConnection = "USE "
CASE (@INWIN = 1) AND (@DOS >= 4) $OSConnection = "SUBST "
CASE (1) $OSConnection = "USE"
ENDSELECT
;<>
$OSConnection S: "\\CHSVR1\Sales" /PERSISTENT

the idea is, that we have NT & W2K in our network, an from what I found out is, that if you just use "USE S: "\\CHSVR1\Sales" for the connect - on the NT Clients you'll have the S: but you can't connect to it through an application, you first have to click on it in the file explorer and afterwards it's just running fine... if I connect it with SUBST (for nt4 of course) then it works from the beginning...

I found a lot of usefull information in this forum already (about shares, OS detection and so on) but most of the scripts I found were just to luxurios for our case, especially for the poor guy who has to handle it when I finished it ;-) so, therefore I'm really looking for a KISS solution (I presume it's just a matter on how to write the command correct)

thnks

.Ralph

Top
#16152 - 2002-01-14 07:20 PM Re: Using a shell command with a variable
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Hi Ralph, Welcome

Is this the answer your looking for ?

$nul = Execute('$OSConnection S: "\\CHSVR1\Sales" /PERSISTENT')

-Shawn

Top
#16153 - 2002-01-14 07:24 PM Re: Using a shell command with a variable
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
oops, maybe this is what you were looking for ?

Shell('%comspec% /c $OSConnection S: "\\CHSVR1\Sales" /PERSISTENT')

-Shawn

[ 14 January 2002: Message edited by: Shawn ]

Top
#16154 - 2002-01-14 07:36 PM Re: Using a shell command with a variable
RalphG Offline
Fresh Scripter

Registered: 2002-01-14
Posts: 11
Loc: CH
hi shawn...

well, the first one is working...
(at least on my W2k)

I'll try it tomorrow on a NT machine...

(It's 18:30 here and I didn't except an answer that fast, so I already did the rollout for today (with some other enhancements))

cheers & thnks

.Ralph

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1452 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.056 seconds in which 0.028 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org