Page 2 of 2 <12
Topic Options
#53690 - 2002-09-12 06:36 PM Re: desk top icon for mapped drives
El Guappo Offline
Fresh Scripter

Registered: 2002-05-14
Posts: 10
Loc: Vancouver, BC
The odd thing about this problem is that when the code loops around to the Shell command again, I do not get the Error 2250 message (network connection not found) as I do the first time the Shell command is executed. I copied your suggestion to replace the Shell command I had in the code and still have the Error message... I also tried replacing %comspec% with %SystemRoot%\System32\cmd.exe...thinking that a direct path may find the COMSPEC...

Still no go..

Top
#53691 - 2002-09-12 11:24 PM Re: desk top icon for mapped drives
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
If you type SET COMSPEC at the command prompt you will get the path to the command interpreter displayed.
_________________________
There are two types of vessels, submarines and targets.

Top
#53692 - 2002-09-13 01:38 AM Re: desk top icon for mapped drives
El Guappo Offline
Fresh Scripter

Registered: 2002-05-14
Posts: 10
Loc: Vancouver, BC
Its goofy. I know where the COMSPEC is and if
I run the script on the server, it works. Set Comspec on the command line confirms where it is But when my users login they still get the network connection not found..Plus, like I said earlier the enviroment variables are set (ComSpec=C:\Winnt\system32)...
I appreciate your input...and understand if ya think this is hopeless...

EG

Top
#53693 - 2002-09-13 02:05 AM Re: desk top icon for mapped drives
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
EG, nope, not worthless. I have had so many problems about starting %comspec%, that I gave up.
I use simply:
go c:

before calling the shell.
don't know, is it loading issue or what, but I myself have found no fix to it.
_________________________
!

download KiXnet

Top
#53694 - 2002-09-13 02:14 AM Re: desk top icon for mapped drives
El Guappo Offline
Fresh Scripter

Registered: 2002-05-14
Posts: 10
Loc: Vancouver, BC
Thanks for your input. I'm at the end of the line. I cannot figure this out. Its way to inconsistant to depend on...I'll have to figure out a different way to add a shortcut to the desktop for mapped drives...

Thanks for all your help..

Mark

Top
#53695 - 2002-09-13 05:37 AM Re: desk top icon for mapped drives
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
If you just run a test script with just a SHELL command in it, do you still get that problem? I've never had problems with SHELL unless pointing to network shares that were inaccessible when trying to run a command.
_________________________
There are two types of vessels, submarines and targets.

Top
#53696 - 2002-09-13 08:15 AM Re: desk top icon for mapped drives
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11629
Loc: CA
Maybe try also checking the PATH. Perhaps the path has been improperly set.

As Jens says. Try running a simple one.

Top
#53697 - 2002-09-13 06:38 PM Re: desk top icon for mapped drives
El Guappo Offline
Fresh Scripter

Registered: 2002-05-14
Posts: 10
Loc: Vancouver, BC
I've never had problems with SHELL unless pointing to network shares that were inaccessible when trying to run a command

I think that is the issue. The path on the server is correct and I cannot do a direct c:\winnt\system32\ to ensuire the Cmd is accessable....so I've run out of options...set comspec shows the proper path...

Even in the Enviroment variables I've got comspec set...

So, it comes down to my W/S not being able to find the Shell on the first pass of the command. Again, when the program loops it does find the Shell...

??

Top
#53698 - 2002-09-13 06:41 PM Re: desk top icon for mapped drives
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Try a simple script with just a SHELL '%COMSPEC% ...' in it and see why it fails. I just cannot believe that it fails on the first try but succeeds on subsequent tries. And use @ERROR to evaluate potential error codes.
_________________________
There are two types of vessels, submarines and targets.

Top
#53699 - 2002-09-13 08:29 PM Re: desk top icon for mapped drives
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
I just goy a message from ElGuappo and he provided a tidbid of information that he neglected to mention beforehand. He is using Terminal Services.
quote:

I’m getting to writing a small script with @error, but I want to ask you a question. I connect to my server via Terminal services client. I call the logon.kix via a logon.bat. When I login to the server, the batch file fires off and the CODE WORKS. So, the code is successful loggin into the server but not the W/S….All systems are running W2K Prof – except obviously the server…W2K Server..

This sure sounds like a path issue, but I’ve check all that I can think of. When the %comspec% is called, I am suspecting it is calling cmd from the server, correct?

Anyways, I’ll start with a little script and try and figure out wha’s up..

I really do appreciate all your help…

Mark

_________________________
There are two types of vessels, submarines and targets.

Top
Page 2 of 2 <12


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

Who's Online
1 registered (Allen) and 675 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.076 seconds in which 0.038 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