Page 1 of 1 1
Topic Options
#10769 - 2001-07-23 08:22 PM Shell command with variable
Anonymous
Unregistered


Hi, I am currently trying to revamp some of my log in scripts. Our network has one logon domain and 12 resource domains. Each resource domain has Norton Antivirus Corprate edition installed on one server and I am having a hard time trying to make one line to run the batch file instead of one for each school.

Example:

code:
Shell="%comspec% /c \\psd1\netlogon\kix\advplogon.bat" 

works fine but I would like to make this a variable
such as
code:
$nav="shell="%comspec% /c \\psd1\netlogon\kix\advplogon.bat"  

And then just call it at the end with

code:
 $nav 

I'm sure this can be done please let me know.

Thanks alot

John

Top
#10770 - 2001-07-23 08:34 PM Re: Shell command with variable
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
John, long time no see ?

Perhaps the easiest way to soften that whole thing up would be to:

BREAK ON

$NAV = 'SHELL "%COMSPEC% /C \\PSD1\NETLOGON\KIX\ADVPLOGON.BAT"'

$=EXECUTE($NAV)

EXIT

-Shawn

[ 23 July 2001: Message edited by: Shawn ]

Top
#10771 - 2001-07-24 03:43 PM Re: Shell command with variable
Anonymous
Unregistered


Thanks Shawn works great
Top
#10772 - 2001-07-27 01:06 PM Re: Shell command with variable
Anonymous
Unregistered


Building off this question, how would that snippit of code look if you wanted to pass the @lserver in in place of the PLC1 server?? (i think that was the name of his server)

Shell="%comspec% /c " + @LSERVER "\netlogon\kix\advplogon.bat"

Would that work? Or is the syntax wrong?

I am thinking this could help me with timing problems in my script where the Z: drive is gone before the script ends...

Top
#10773 - 2001-07-27 09:35 PM Re: Shell command with variable
Anonymous
Unregistered


Kirk, I do it like this and it seems to work fine. After this post I changed it and it works.

code:
 shell "%comspec% /c @lserver\netlogon\kix\advplogon.bat" 

I hope this helps

John

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 1046 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.049 seconds in which 0.023 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