Page 1 of 1 1
Topic Options
#75630 - 2003-07-03 03:42 PM Pulling my hair out over somthing simple.
Cindi Offline
Fresh Scripter

Registered: 2003-07-03
Posts: 5
Loc: Chesapeake Beach, Maryland
I have read the manual and I have read the other post here by Laura thinking it might help. It didn't [Frown]

Here's my script:

CLS

"Hello "+ @FULLNAME
Chr(10)
Chr(10)
SETTIME "\\BSISRVE01"
"You local systems time has been synchronized with the server."
Chr(10)
Chr(10)
"Current time = " + @time
Chr(10)

USE "*" /DELETE ;Delete current drive mappings
USE H: \\titan\engineering
USE M: \\BSISRVE01\m2mdata
USE P: \\BSISRVE01\public
USE S: \\titan\sales
USE U: \\titan\disk1
USE Z: \\titan\%username%

IF InGroup( “test” )
use F: \\bsisrve01\acct
ENDIF

USE LIST
SLEEP 10

The thing works great! Except I have a group test and I am a member of it; and the darn thing will not map that F: drive to save my life.

Script is sitting on a W2k server and the client workstation is w2k pro.

I sure could use some help.

Top
#75631 - 2003-07-03 03:50 PM Re: Pulling my hair out over somthing simple.
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Did you try it without the curly quotes?
Did you try to logoff/logon to get a new token?
Did you try to flush the cache?
Did you try it with the domain name included?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#75632 - 2003-07-03 03:54 PM Re: Pulling my hair out over somthing simple.
Darren_W Offline
Hey THIS is FUN
*****

Registered: 2001-10-10
Posts: 208
Loc: Bristol, England
Hi,

Can you map it manually?

Or

If you run "net use F: \\bsisrve01\acct" does that work?
_________________________
I want to share something with you - the three sentences that will get you through life.
Number 1, 'cover for me.'
Number 2, 'oh, good idea, boss.'
Number 3, 'it was like that when I got here'.

Top
#75633 - 2003-07-03 03:55 PM Re: Pulling my hair out over somthing simple.
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
See the FAQ Forum under Curly quotes “ and ” .

Also, the SETTIME command requires at least "Power User" rights. However, it is recommended to use the windows Time Service to synchronize times, which is a requirement in a AD domain.

code:
USE H: '\\titan\engineering'

is the correct way to map a drive. And please use @USERID instead of the environment variables as in
code:
USE Z: '\\titan'+@USERID
; verify that the function was successful
? 'Error '+@ERROR+' - '+@SERROR

Please be aware that under Windows 9x the Z: drive is temporarily used to map the NETLOGON share and is thus unavailable for drive mappings during the login process (just in case you're still having Win9x around).

[ 03. July 2003, 15:56: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#75634 - 2003-07-03 03:56 PM Re: Pulling my hair out over somthing simple.
Cindi Offline
Fresh Scripter

Registered: 2003-07-03
Posts: 5
Loc: Chesapeake Beach, Maryland
Without the quotes around the group name? No I haven't tried that. Will do that now.

I have logged out and back in, that's how I am testing it.

As far as flushing the cache I have the /f switch after the script command in my bat file. So I assume I am flushing the cache.

Here's the batch file.

\\bsisrve01\netlogon\Kix32 \\bsisrve01\netlogon\Script1 /f
EXIT 0

Top
#75635 - 2003-07-03 03:57 PM Re: Pulling my hair out over somthing simple.
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
No, not without quotes... without the curly variety.

Use the straight ones.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#75636 - 2003-07-03 03:58 PM Re: Pulling my hair out over somthing simple.
Cindi Offline
Fresh Scripter

Registered: 2003-07-03
Posts: 5
Loc: Chesapeake Beach, Maryland
Well it works without the quotes. I guess I only need the quotes if there are spaces in the text right?

[ 03. July 2003, 16:00: Message edited by: Cindi ]

Top
#75637 - 2003-07-03 04:01 PM Re: Pulling my hair out over somthing simple.
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
See also the FAQ
Topic: Proper use of quotes

In fact, see ALL the FAQs. [Big Grin]
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#75638 - 2003-07-03 04:03 PM Re: Pulling my hair out over somthing simple.
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
No, you do want ot use quotes all the time, otherwise you might develop bad scripting habits. Cleaned up script would look like this:
code:
CLS
cls
? 'Hello '+ @FULLNAME
SETTIME '\\BSISRVE01'
if @ERROR
? 'SETTIME: Error '+@ERROR+' - '+@SERROR
else
? 'You local systems time has been synchronized with the server.'
endif
? 'Current time = ' + @time
;Delete current drive mappings
USE '*' /DELETE /PERSISTENT
USE H: '\\titan\engineering'
USE M: '\\BSISRVE01\m2mdata'
USE P: '\\BSISRVE01\public'
USE S: '\\titan\sales'
USE U: '\\titan\disk1'
USE Z: '\\titan\'+@USERID
IF InGroup('test')
use F: '\\bsisrve01\acct'
ENDIF

USE LIST
? 'Press any key to continue'
get $key
exit 0

Corrected quotes. [Embarrassed]

[ 03. July 2003, 16:54: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#75639 - 2003-07-03 04:12 PM Re: Pulling my hair out over somthing simple.
Cindi Offline
Fresh Scripter

Registered: 2003-07-03
Posts: 5
Loc: Chesapeake Beach, Maryland
Thanks for looking at the script! I have tried your script but it only maps the F drive nothing else. Also we have to do a lot of hand holding here so we don't want to have to make them hit any extra key. They might chip a nail or something. That's why I had the box closing automatically.
Top
#75640 - 2003-07-03 04:17 PM Re: Pulling my hair out over somthing simple.
Cindi Offline
Fresh Scripter

Registered: 2003-07-03
Posts: 5
Loc: Chesapeake Beach, Maryland
Yes I noticed that our two 98 machines were not getting their z drives mapped. I know why that’s happening but don't really care since those machines are going bye bye at the end of July so for now I'll just map them locally.
Top
Page 1 of 1 1


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

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

Generated in 0.061 seconds in which 0.025 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