Page 1 of 1 1
Topic Options
#203790 - 2011-11-18 02:42 PM script partially loaded??
mdewals Offline
Just in Town

Registered: 2011-11-18
Posts: 4
Loc: Netherlands
Hello,

I'm experiencing some problems with Kixtart on a Windows 2008 Terminal Server.

Our script first deletes the current desktop and start menu and then proceeds to make a new one.

However some users end up with an empty start menu. The program shortcuts it should load are not there.

The script first deletes the old files before proceeding to creating the new one's. So it's not a user-error by doing it the wrong way around.

If said user experiences this, a simple logoff and logon fixes the problem.
I cannot really put my finger on the problem.

Any suggestions on how to debug this? Or anyone else had this happen as well?

Greetings,

Micha

Top
#203792 - 2011-11-18 03:57 PM Re: script partially loaded?? [Re: mdewals]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
the shortcuts, do they come from different share?
_________________________
!

download KiXnet

Top
#203795 - 2011-11-18 04:18 PM Re: script partially loaded?? [Re: Lonkero]
mdewals Offline
Just in Town

Registered: 2011-11-18
Posts: 4
Loc: Netherlands
no. All shortcuts are programs on the specific server like Notepad, calculator and locally installed software
Top
#203799 - 2011-11-18 04:34 PM Re: script partially loaded?? [Re: mdewals]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
so...
might be that the timeout for the script is reached.

to debug it, start with checking the eventlog.
then, add debug lines to your script (every now and then, to locate what gets done before failure):
shell "%comspec% /c echo %time% - done thisandthat "+@error+", going to thatandthose >> %temp%\logon.log"


Edited by Lonkero (2011-11-18 04:38 PM)
_________________________
!

download KiXnet

Top
#203802 - 2011-11-18 05:18 PM Re: script partially loaded?? [Re: Lonkero]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
It may be possible to change the default timeout. On terminal servers I also often put stuff in UsrLogon or other compatibility scripts.

You could do the destruction in the first script but then put the rebuild portion in another script run via RunOnce in HKCU.

The sequence of events follows this order:
1.[System Boot]
2.HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce
3.HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices
4.[Logon Dialog]
5.[Load User Profile]
6.[Apply Microsoft Policies]
7.[Network Logon Script]
8.HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce
9.[Desktop/Shell]
10.HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
11.HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
12.HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce
13.[Startup Folder]
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#203995 - 2011-12-27 01:07 PM Re: script partially loaded?? [Re: Les]
mdewals Offline
Just in Town

Registered: 2011-11-18
Posts: 4
Loc: Netherlands
Sorry for late reaction. Other, more important, problems, changes and personal stuff kept me from this one.

I have a functions.kix file which has the "delete desktop" and "Delete Start menu" options.
These are called from within the [username].kix file. The next step is loading all items.

so basically its doing the following

- Call function "delete desktop"
- Call function "delete start menu"
- Add desktop icons
- Add start menu icons.

So it seems the called function is not starting right away but the script continues anyway. And as a result, the start menu "stays" empty.

Or am I being silly and this isn't possible.

Top
#203996 - 2011-12-27 02:14 PM Re: script partially loaded?? [Re: mdewals]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
Post your code..

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#204012 - 2012-01-06 12:23 PM Re: script partially loaded?? [Re: Glenn Barnas]
mdewals Offline
Just in Town

Registered: 2011-11-18
Posts: 4
Loc: Netherlands
User kix file

 Code:
delmenustart()
delbureaublad()

$startmenu="C:\users\"+$userid+"\AppData\Roaming\Microsoft\windows\Start Menu\Programma's"

$kschijf="\\TELESALES\kwaliteitshandboek"
USE k: $kschijf
$=wshShortcut("Kwaliteitshandboek","\\TELESALES\Kwaliteitshandboek")

$=wshShortcut($startmenu+"\Bureau-accessoires\Kladblok","%SystemRoot%\system32\notepad.exe")
$=wshShortcut($startmenu+"\Bureau-accessoires\Imaging","C:\Program Files (x86)\Windows NT\Bureau-accessoires\ImageVue\kodakimg.exe")
$=wshShortcut($startmenu+"\Bureau-accessoires\Paint","%SystemRoot%\System32\mspaint.exe")
$=wshShortcut($startmenu+"\Bureau-accessoires\Rekenmachine","%SystemRoot%\System32\calc.exe")
$=wshShortcut("Ice Ten","C:\Program Files (x86)\J River\ICE.TEN\dejawin.exe")
; Microsoft Office 2000
$=wshShortcut($startmenu+"\Microsoft Excel","C:\Program Files (x86)\Microsoft Office\OFFICE\excel.exe")
$=wshShortcut($startmenu+"\Lotus Notes","C:\Program Files (x86)\IBM\Lotus\Notes\notes.exe",,"C:\Program Files (x86)\IBM\Lotus\Notes\framework/..")
$=wshShortcut($startmenu+"\Ice Ten","C:\Program Files (x86)\J River\ICE.TEN\dejawin.exe")
$=wshShortcut($startmenu+"\Firefox","C:\Program Files (x86)\Mozilla Firefox\firefox.exe")
$=wshShortcut($startmenu+"\Iptor","C:\Thinkwise Software\end_product_group1\tsf_dotnet.exe",iam_160_winlogon.ini,"C:\Thinkwise Software\end_product_group1")
$=wshShortcut("Bestandsbeheer","E:\share\Bestandsbeheer")
$=wshShortcut("Iptor Handleiding","E:\iptor\index.html")

; Open Office
$oo=$startmenu+"\Openoffice.org 3"
MD $oo
$=wshShortcut($oo+"\OpenOffice.org Base","C:\Program Files (x86)\OpenOffice.org 3\program\sbase.exe",,"C:\Program Files (x86)\OpenOffice.org 3\basis\progam")
$=wshShortcut($oo+"\OpenOffice.org Impress","C:\Program Files (x86)\OpenOffice.org 3\program\simpress.exe")
$=wshShortcut($oo+"\OpenOffice.org Math","C:\Program Files (x86)\OpenOffice.org 3\program\smath.exe")
$=wshShortcut($oo+"\OpenOffice.org Calc","C:\Program Files (x86)\OpenOffice.org 3\program\scalc.exe")
$=wshShortcut($oo+"\OpenOffice.org Writer","C:\Program Files (x86)\OpenOffice.org 3\program\swriter.exe")
$=wshShortcut($oo+"\OpenOffice.org Draw","C:\Program Files (x86)\OpenOffice.org 3\program\sdraw.exe")

; Opstarten
$opstarten=$startmenu+"\startup"
MD $opstarten
$=wshShortcut($opstarten+"\OpenOffice.org SnelStarten","C:\Program Files (x86)\OpenOffice.org 3\program\quickstart.exe",,"C:\Program Files (x86)\OpenOffice.org 3\program")
; Adobe Acrobat Reader 10
$=wshShortcut($startmenu+"\Adobe Acrobat Reader 10","C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.exe")


$=wshShortcut("Lotus Notes","C:\Program Files (x86)\IBM\Lotus\Notes\notes.exe",,"C:\Program Files (x86)\IBM\Lotus\Notes\framework/..")
$=wshShortcut("Iptor","C:\Thinkwise Software\end_product_group1\tsf_dotnet.exe",iam_160_winlogon.ini,"C:\Thinkwise Software\end_product_group1")


; Microsoft Office 2000
$=wshShortcut($startmenu+"\Microsoft Excel","C:\Program Files (x86)\Microsoft Office\OFFICE\excel.exe")




functions.kix

 Code:
; (C) Mosadex CV, L.Maes
; Date written: 17/06/2005
; Modified: 
;
; functions.kix
; functies

; debug($string) : schrijf een debug bericht in de console als debugging aanstaat
function debugstr($string)
	if $debug=1
		? $string
	endif
endfunction

function sysok()
	if exist($sysok_location+$wksta+".ok")
		debugstr ("Systeempolicies zijn geconfigureert...")
		$sysok=1
	else
		debugstr ("Systeempolicies zijn NIET geconfigureert...")
		sendadminmessage()
		? "Deze computer is niet klaar voor gebruik!"
		? "Neem contact op met afdeling systeembeheer"
		get $x
		logoff()
		$sysok=0
	endif
endfunction

function sendadminmessage()
 for each $admin in $admins
    sendmessage($admin,"Systeem: "+$wksta+" is niet gereed! "+$userid+" probeerde hierop in te loggen!")
 next 
endfunction

function delstartmenu()
	DeleteFF("C:\Documents and Settings\"+$userid+"\Start Menu\Programs","Content","True")
endfunction

function delNLstartmenuNL()
	DeleteFF("C:\Documents and Settings\"+$userid+"\menu start\Programma's","Content","True")
endfunction

function delmenustart()
	DeleteFF("C:\Users\"+$userid+"\AppData\Roaming\Microsoft\Windows\Start Menu\","Content","True")
endfunction

function delbureaublad()
	DeleteFF("C:\Users\"+$userid+"\Desktop","Content","True")
endfunction

function deldesktop()
	DeleteFF("C:\Documents and Settings\"+$userid+"\Desktop","Content","True")
endfunction

function delNLdesktopNL()
	DeleteFF("C:\Documents and Settings\"+$userid+"\Bureaublad","Content","True")
endfunction

; Externe functies laden

; WshShortCut()
call $lib_location+"wshshortcut.kix"
call $lib_location+"deleteff.kix"


Edited by Allen (2012-01-06 02:00 PM)
Edit Reason: added code tags

Top
#204014 - 2012-01-06 02:21 PM Re: script partially loaded?? [Re: mdewals]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
A couple of things.

DeleteFF, can you provide the code for that?

In your first post you mention a simple logoff and log back in fixes the problem. This sounds similar to the old problem of Windows running scripts before the network was ready. I don't know if it applies but this might be worth looking into:

Windows XP Professional Fast Logon Optimization -
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=112428#Post112428

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 329 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.058 seconds in which 0.023 seconds were spent on a total of 14 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org