Page 1 of 1 1
Topic Options
#129058 - 2004-11-05 09:25 PM Mapping drives after VPN client connection
jadewith Offline
Fresh Scripter

Registered: 2003-06-13
Posts: 45
Loc: Good ole U S of A
cheers all,

Its been a long time since I've asked you all a question about a script. but here goes, I am running windows 2000pro machines on a 2000 AD domain with KiXtart 2001. My users run a bat file to start the script.
Here is my Script:

Code:
 ;**** Created with KiXscripts Editor | http://KiXscripts.com ****
;**** Last Modified on 7/11/2003 at 12:21:56 PM by jdewith ****


Shell ("c:\program files\cisco systems\vpn client\ipsecdialer.exe")

$svr=GetFileTime(\\cicero\cnd\lotus\cndgroup.nsf)
$local=GetFileTime(c:\notes\data\cndgroup.nsf)


del %windir%\system32\drivers\etc\hosts
del %windir%\system32\drivers\etc\lmhosts

Use g: "\\cicero\cnd\@primarygroup\@primarygroup_priv"
Use p: "\\cicero\cnd\@primarygroup\@primarygroup_pub"
Use U: "\\cicero\cnd\users\@USERID"

If ReadValue("hkcu\software\microsoft\office\9.0\common\general","SharedTemplates")<>"c:\templates"
$RK=WriteValue("hkcu\software\microsoft\office\9.0\common\general","SharedTemplates","c:\templates","REG_EXPAND_SZ")
If @ERROR = 0
; ? "9.0 value written" ;if you are having issues with this key being entered run the script in debug mode AND remove the ";" At the beginning of this line
EndIf
EndIf

MD("\\cicero\cnd\lotus\@WKSTA\@USERID") ; The directory that stores all individual system's Lotus Notes .id files

If $local<>$svr ; Copies ONLY the most current cndgroup.nsf to the workstation
Copy "\\cicero\cnd\lotus\cndgroup.nsf" "c:\notes\data"
EndIf

If NOT Exist("\\cicero\cnd\lotus\@WKSTA\@USERID\*.id")
Copy "C:\notes\data\*.id" "\\cicero\cnd\lotus\@WKSTA\@USERID"

EndIf

If NOT Exist("\\cicero\cnd\lotus\@WKSTA\@USERID\names.nsf")
Copy "C:\notes\data\names.nsf" "\\cicero\cnd\lotus\@WKSTA\@USERID"
EndIf

$svrname=GetFileTime('\\cicero\cnd\lotus\@WKSTA\@USERID\names.nsf')
$localname=GetFileTime(c:\notes\data\names.nsf)

If $localname<>$svrname ; Copies the latest Lotus local address book to the server based on the modification date
Copy "C:\notes\data\names.nsf" "\\cicero\cnd\lotus\@WKSTA\@USERID"
EndIf


Call c:\logon\aw.kix


if not exist("C:\Program Files\Dynamic Connect\Session\wanda.dcs")
copy "\\cicero\is_pub\wanda.dcs" "C:\Program Files\Dynamic Connect\Session"
endif

if not exist("c:\documents and settings\@userid\favorites\Creative Nail Design Helpdesk.lnk")
copy "\\cicero\is_pub\Creative*" "c:\documents and settings\@userid\favorites\"
endif



The problem is when the script is run it "shells" to the client just fine but after they enter their password info the rest of the script doesn't go. But if I run the script AGAIN and close the resulting status window everything goes as expected. What can I do to make the script run correctly the first time?

As always,
Thanks for your help!

P.S. I have eliminated the possibility tat it could be a Permissions issue by running the script as an admin as well as a normal user.
thnx

Top
#129059 - 2004-11-05 10:50 PM Re: Mapping drives after VPN client connection
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
What VPN client do you use? We use Cisco and configure it to establish the VPN tunnel before logon. this connects you to the network and the user can logon as if he were in the office. Our logon script executes as expected.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#129060 - 2004-11-05 11:00 PM Re: Mapping drives after VPN client connection
jadewith Offline
Fresh Scripter

Registered: 2003-06-13
Posts: 45
Loc: Good ole U S of A
We too use the Cisco client, however if the user is already logged into the remote system and then deceides to connect to the network they MUST log off the system and log back into our network in order to get network shares and the like.
Top
#129061 - 2004-11-06 12:15 AM Re: Mapping drives after VPN client connection
jadewith Offline
Fresh Scripter

Registered: 2003-06-13
Posts: 45
Loc: Good ole U S of A
Actually though Howard while what you said is true, it is not the answer to the question. I'm wondering why my script isn't running correctly without needing to run it twice.
Top
#129062 - 2004-11-06 01:54 AM Re: Mapping drives after VPN client connection
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Are you logging into the computer using the cached domain credentials or local workstation user/password?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#129063 - 2004-11-12 11:20 PM Re: Mapping drives after VPN client connection
jadewith Offline
Fresh Scripter

Registered: 2003-06-13
Posts: 45
Loc: Good ole U S of A
Sorry I took so long to get back to you.

They use cached domain credentials to logon to their systems.

Top
#129064 - 2004-11-12 11:36 PM Re: Mapping drives after VPN client connection
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Hmmm... How do they handle password changes?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#129065 - 2005-03-09 06:55 PM Re: Mapping drives after VPN client connection
Udaloy Offline
Fresh Scripter

Registered: 2003-09-08
Posts: 31
Loc: Ohio
I'm really interested in this thread as we have the same issues. Some of our laptop users are using cached credentials to login, and they are never really logged into the domain. They connect via VPN, and then complain that their network drives aren't mapped.

The way we handle password changes is to have the traveling person go to the nearest office to log directly into the domain. Now that I'm giving this some thought, our helpdesk people probably use a workaround that we wouldn't approve of...

So, is there any way to get kix to run after VPN connections?


Top
#129066 - 2005-03-15 03:58 AM Re: Mapping drives after VPN client connection
desquinn Offline
Fresh Scripter

Registered: 2005-02-23
Posts: 16
use the CMAK (Connection Manager Administration Kit) to deploy a script that runs the network logon script. Allows you to ensure that the script runs and you can restrict the connection as well.

http://www.microsoft.com/resources/documentation/WindowsServ/2003/standard/proddocs/en-us/sag_CMAKtopnode.asp

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

Generated in 0.194 seconds in which 0.161 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