Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Kix32.exe - mapping drives

Status
Not open for further replies.
Dec 16, 2005
274
GB
Hi,

I have just upgraded my terminal server from w2k to w2k3.
I have a kix32.exe script that runs when my users logon, it maps there network drives.

On 2000 it just ran, because of the new security features on 2003 it asks the users if they want to run it.

I don't want this, is they a way in group policy to make it override the security warning?

If there isn't i am happy to use an alternative script, could someone recommend? i know you can use batch and vbs, but whats best? and could anyone recommend a site to learn how?

thanks
 
Hey Helen

Im just about to face the same thing as I;ve just upgraded my fule & pritner server from 2000 to 2003, so if I find something to help you with the Kix i'll pass it on!!

Andi
 
Time to abandon Kix my friends and move into the world of vbscript.

faq329-5798

I hope you find this post helpful.

Regards,

Mark
 
Mark
Happy to. When i added the vbs file into scripts in policy it did do anything. I put it in the Netlogon folder.

Andi
becareful if you try the wkix32.exe that some site advise it may stop your script working altogther.
 
Helen, you didn't read the whole FAQ.

Scripts should be deployed using GPO and not in the Netlogon folder.
From the FAQ:
OK, now you are ready to put the script on your server. If you started navigating to the Netlogon share forget it. Time to use GPOs!

I realize it is a long FAQ, but advice only works if it is followed fully. ;-)

I hope you find this post helpful.

Regards,

Mark
 
I did but in AD in logon you have to add and browse so the file still needs to be saved somewhere, and saving it in the default location still isn't working
 
Hey Mark / Helen

I'll take a look at the VBScripting stuff and do an update from the Kix script.

Just as a side note, I have succesfully put my existing kixscript from windows 2000 straight onto the 2003 server and it runs just fine, so not to sure what the problems may be.

A quick question on the VBScripting tho, what editor do people recommend? Is it possible to use Visual Studio .net 2003 to do it?
 
My users logon to the server that is the problem the security of 2003 asks them if they want to run the script.
 
Helen

I didnt get any of errors or anything... tis weird... is it worth posting a copy of my login script and settings etx etc?
 
Helen,
The script should be saved into the GPO. The path will of course vary because of the GUID of your GPO but he general location is going to be under \sysvol\policies\guid\scripts\user.

If you follow the instructions in the FAQ you should get the file where it needs to be.

If you have more than one DC you will need to allow time for replication.

After setting up the GPO you will want ot verify if it is being applied on the local PC. On the client you can force an update with GPUPDATE /FORCE. You can then verify if the policy is being applied to the PC running GPRESULT. If you don't see the policy listed then you have a problem with permissions or have some other problem with your AD that needs to be addressed.

The login script in that FAQ has been deployed to sevral hundred companies based on feedback I have received from Tek-Tips users, via my own email and my own deployments, so I am confident in saying it is a solid process if you follow it to the letter.

I hope you find this post helpful.

Regards,

Mark
 
Helen:

On the user account, under login script: domain_login

In the \\server\netlogon

\runtime

\Kix2001.doc
\kix2001.txt
\kix32.exe
\kx16.dll
\kx32.dll
\kx95.dll
\kxrpc.exe
\wkix32.exe

>>>Domain_logon.bat script start

@echo off

%0\..\runtime\kix32.exe %0\..\Domain_Logon_script.kix

Script End <<<<

>>>Domain_Logon_script SCRIPT START


; ===========================================================================================
;
; Script Information
;
; Title: Domain Login Script
; Author: Andi Faulds
; Description: Full Domain Login Script for Regional Offices
; Office: >
; Version: 2.5 Edited 2/12/2005
; (c) The Stroke Association IT Department
; ===========================================================================================
;********************************************************************************************
; Change Control
; 13/04/2005 - new proxy details information. have tested it seperatly on the server and another
; workstation and seems to be ok. Will need to check with users in ELON office tomorrow.
; 21/06/2005 - New Proxy Address entered . Changed from 10.2.0.6 to 10.2.2.2
; 21/06/2005 - Added extra check on the HKLM Internet settings key to change.
; 02/12/2005 - Added PCAudit script to be called at the end of the script.
;********************************************************************************************
;
:SetupScript

;Variable setup
$SupportText = "For all IT Support and Assistance, Please contact the New IT Helpdesk on:"
$SupportContact = "Tel: 0870 417 3894"
$Server = @Lserver
$hour = SubStr("@time",1,2)
$IP1 = Ltrim(SubStr(@IPADDRESS0, 1, 3))
$IP2 = Ltrim(SubStr(@IPADDRESS0, 5, 3))
$IP3 = Ltrim(SubStr(@IPADDRESS0, 9, 3))
$IP4 = Ltrim(SubStr(@IPADDRESS0, 13, 3))
$IP_Address = $IP1 + "." + $IP2 + "." + $IP3 + "." + $IP4
$ServerIP = Ltrim(SubStr(@IPADDRESS0, 5, 3))
$SharedTemplateLoc = ""
$TemplateLocation = "O:\TSATemplates"

;prepare salutation
Select
Case Val("$hour") < 12
$Salutation = "Good Morning"

Case Val("$Hour") > 12 And Val("$Hour") < 18
$Salutation = "Good Afternoon"

Case Val("$Hour") > 18
$Salutation = "Good Evening"

EndSelect

;Prepare logfile
$Log = $Server + "\netlogon\logon.log"
$DeLim = ","
$Chr = Chr(13) + Chr(10)

$handle = FreeFileHandle()
If $handle > 0
Open($handle,$Log,5)
EndIf

Open($Handle,$Log,5)

WriteLine($Handle, $Chr)

:prepareConsole
$ = SetConsole(show)=1
$ = SetConsole("Maximize")
Color c+/n

At (4, 0) $salutation + " " + @FULLNAME
? "Welcome to the @domain Domain"
Color g+/n
? $SupportText
? $SupportContact

:Synch_Workstation_time
SetTime $server
Color c+/n

At (10, 0) "The Current Domain Time Is: @time on @date"
? "************************************************************"

:System_Info
? "Your IP Address is : $IP_Address"
? "Your Domain is : @domain"
? "Your time server is : $Server"
? ""

? "************************************************************"

:Delete_Current_Mappings
Use H: /delete
Use I: /delete
Use L: /delete
Use M: /delete
Use N: /delete
Use O: /delete
Use P: /delete
Use Q: /delete
Use R: /delete
Use S: /delete
Use T: /delete

:Map_Network_Drives_For_All

? "Part 1 | Now Mapping Officewide Drives"

Use Q: $server + "\apps\av"
? "Q Mapped to AntiVirus folder"
Use O: $server + "\shared\region"
? "O Mapped to Office Shared Folder"
Use U: $server + "\homedir\@userid"
? "U Mapped to @userid HomeDirectory"
Use Z: $server + "\Mailboxes"
? "Z Mapped to Mailbox Folder"

:Map_Group_Membership_Drives
? $server
? ""
? " Part 2 | Now Mapping Group Membership Drives"

If InGroup("DSO")
Use M: $server + "\shared\DSO"
? "M Mapped to DSO Shared Folder"
EndIf

If InGroup("FSO")
Use N: $server + "\shared\FSO"
? "N Mapped to FSO Shared Folder"
EndIf

If InGroup("ETISO")
Use P: $server + "\shared\ETISO"
? "P Mapped to ETISO Shared Folder"
EndIf

If InGroup("RegMgr")
Use R: $server + "\shared\RegMgr"
? "R Mapped to RegMgr Shared Folder"
EndIf

If InGroup("Fundraising")
Use L: $server + "\shared\Fundraising"
? "L Mapped to Fundraising Shared Folder"

Use H: $server + "\Apps"
? "H Mapped for access to FD Database"

EndIf

If InGroup("IT")
Use I: $server + "\Apps"
? "I Mapped for the ITD Bods"
EndIf

If InGroup("DSFSDB")
Use H: $server + "\Apps"
? "H Mapped for access to DSO FSO Stats Database"
EndIf

:IE_Users
? ""
? " Part 3 | Configuring Internet Settings"
;This section will provide proxy details for IE for Internet Users ONLY
If InGroup("IEUsers")
;This NEW section is the proxy amendments
$ProxyServer = "10.2.2.2:8080"
$IEHomepage = "$ServerIP = Ltrim(SubStr(@IPADDRESS0, 5, 3))
$ProxyOverRide = "10." + $serverIP + ".0.100;<local>"

$PEnable = ReadValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "Proxy Enabled")

If $PEnable <> 1
WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable", "1", "REG_DWORD")
? "1a)Proxy has been enabled"
Else
? "1b)Proxy already enabled"
EndIf

;Check HKCU
$ExProxyServer = ReadValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings","ProxyServer")

If $ExProxyServer = $ProxyServer
? "2b)Proxy alread set to :" + $ProxyServer
Else
WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyServer", $ProxyServer, "REG_SZ")
? "2a)Proxy changed to " + $ProxyServer
EndIf

;Check HKLM
$ExProxyServer = ""
$ExProxyServer = ReadValue("HKEY_Local_Machine\Software\Microsoft\Windows\CurrentVersion\Internet Settings","ProxyServer")

If $ExProxyServer = $ProxyServer
? "2d)Proxy alread set to :" + $ProxyServer
Else
WriteValue("HKEY_Local_Machine\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyServer", $ProxyServer, "REG_SZ")
? "2c)Proxy changed to " + $ProxyServer
EndIf

$ExPOR = ReadValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyOverride")

If $ExPOR <> $ProxyOverRide
WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyOverride", $ProxyOverRide, "REG_SZ")
? "3a)Proxy Override set"
Else
? "3b)Proxy Override already set"
EndIf

$SetHomePage = ReadValue("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Start Page")
? $sethomepage

If $sethomepage <> $IEHomePage
WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Start Page", $IEHomepage, "REG_SZ")
? "4a)Homepage changed"
Else
?"4b)Homepage already configured"
EndIf

Goto Part4

:part4
? ""
? ""
? "Part 4 | Additional Logon Script Features"
? ""
? "i) TSA Standard Templates Configuration"
WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Common\General","SharedTemplates",$TemplateLocation,"REG_SZ")
$SharedTemplateLoc = ReadValue("HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Common\General","SharedTemplates")
? ""
? "Shared Template moved to: " + $SharedTemplateLoc
;Call "templates.kix"
? ""
? "TSA Standard Templates configured"
? ""

:Update_Log
WriteLine($Handle, "@DATE, @TIME,@USERID,$myIP")
Close($handle)

:pCAUDITv1
? ""
? "ii) PC Audit"
Color g+/n
? ""
? ""
? "Please wait while the IT Department performs an Audit of your PC"

Call "PCAuditv1.kix"

? ""
? "Logon Script Complete : @Time. This screen will autoclose in 5 seconds."

Sleep 5

End Script<<<<
 
Kix is for people stuck in the 80's, lol, ;-)

if the users are getting messages about 'do they want to run the script it could be a virus then you might want to look at

strTemp = "computername.domainname"
WshShell.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\ESCDomains\" & strTemp & "\*", 1 ,"REG_DWORD"

perhaps i am shootin in the dark
 
Mrmovie..

I cant help the perm and the dodgy jumpers tho... just so comfy..

What is the best wsh/vbscript editor to move to? Also, could Visual Studio .net do the scripting editor??

 
You can use any text editor for editing scripts. I like Sapiens Primal Script the best, if you have Visual Studio you could certainly use that though. MS Office comes with a script editor too, though for the life of me I can't recall the name of the EXE as it is well burried in the program files.

I hope you find this post helpful.

Regards,

Mark
 
I had a smiliar problem but after reading mark's faq I am no longer on kix, you have to customize it to your enviornment and set up a Group Policy like he says and it will work, make sure your user's are in the domain.

BENZ
"Non erravi perniciose!
 
Ok my file is under

\\munoz.co.uk\SysVol\munoz.co.uk\Policies\{6D054969-5141-4C7F-8383-7AF1274EDAE2}\User\Scripts\Logon

I right clicked the orgainstaional unit test, proeprties, group policy, edit, windows settings,scripts, add.

I have run the script it does work just not at login automatically.

The sysvol is replicating and i have block inhertiance form the current policy.
 
i use primal script for editing vbs stuff
the only thing i use it for is the nice colours :)
 
Helen at what level in your AD structure did you apply the policy?

I hope you find this post helpful.

Regards,

Mark
 
It is under the domain munoz.co.uk, under three organisational units. But i have blocked policy inhertiance.
I'm just doing a little test at the mo.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top