DaRKNeSS666NL Posted December 9, 2005 Posted December 9, 2005 Hi allI have found a script on the MS oem site that is sorting up your desktop automaticley.I already customised the script to my native language of MS xp pro.But now I am stuck. Where do I put this script?On the oem site they say The following scripts can be included in your Windows® XP preinstall by including in a [GUIRunOnce]section of the Unattend.txt file or a [OEMRunOnce] section of the Winbom.ini file:But this is magic to me. Is there any body out there who is able to help me?Greats DaRKNeSSPS; I have included the txt file i have saved witch will explain how to make the script so you can make one your self, I know I have search a long time to get my recycle bin out of its right corner. and now I am realy close autosort_desktop_icons.txt
gunsmokingman Posted December 9, 2005 Posted December 9, 2005 What method are you using [GUIRunOnce] or the RunOnceEx method.
DaRKNeSS666NL Posted December 9, 2005 Author Posted December 9, 2005 gunsmokingmanI am using the RunOnceEx method to install all of my apps.DaRKNeSS
gunsmokingman Posted December 10, 2005 Posted December 10, 2005 (edited) I have re edit the script to thisSave as SortIcons.VBSDim Act, AppData, Fso,SDSet Act = CreateObject("WScript.Shell")Set Fso = CreateObject("Scripting.FileSystemObject")SD = Act.ExpandEnvironmentStrings("%Systemdrive%")''''' APPDATA IS NOW A VARIBLE FOR THE VBS SCRIPT''''GERMAN LANGUAGE ''''JUST CUT AND PASTE THE GERMAN VERSION --> APPDATA & "\Microsoft\Internet Explorer\Quick Launch\Desktop anzeigen.scfAppData = Act.ExpandEnvironmentStrings("%Appdata%")AppData = AppData & "\Microsoft\Internet Explorer\Quick Launch\Show Desktop.scf" 'Minimize all open windowsAct.Run(Chr(34) & AppData & Chr(34))WScript.Sleep 1000'Refresh DesktopAct.sendkeys "{F5}"WScript.Sleep 500''''' FOR GERMAN LANGUAGE OF WINDOWS'''''Act.sendkeys "M"'''''Act.sendkeys "A"'Auto Sort IconsAct.sendkeys "+{F10}"Act.sendkeys "I"Act.sendkeys "A"'''' CLEAN UP THE VBS FILE IF IT EXISTS '''' THIS IS WHERE IT WILL BE EXTRACTED FROM THE SFX FILE.If Fso.FileExists(SD & "\SortIcons.vbs") Then Fso.DeleteFile(SD & "\SortIcons.vbs")End If No all you have to do is add it to the RunOnceEx.cmdExample Onlyfor %%i in (C: D: E: F: G: H: I: J: K: L: M: N: O: P: Q: R: S: T: U: V: W: X: Y: Z:) do if exist %%i\SETUP.exe set CDROM=%%iSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "The Install Section" /fREG ADD %KEY%\000 /VE /D "Preparing Installation..." /fREG ADD %KEY%\001 /VE /D "Sort Desktop Icons" /fREG ADD %KEY%\001 /V 1 /D "%CDROM%Apps\SortIcon.vbs" /fI have included a sfx file with the above script in it so the RunonceEx.cmd should look like thisExample Onlyfor %%i in (C: D: E: F: G: H: I: J: K: L: M: N: O: P: Q: R: S: T: U: V: W: X: Y: Z:) do if exist %%i\SETUP.exe set CDROM=%%iSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "The Install Section" /fREG ADD %KEY%\000 /VE /D "Preparing Installation..." /fREG ADD %KEY%\001 /VE /D "Sort Desktop Icons" /fREG ADD %KEY%\001 /V 1 /D "%CDROM%Apps\SortIcon.exe" /f Edited January 31, 2006 by gunsmokingman
DaRKNeSS666NL Posted December 10, 2005 Author Posted December 10, 2005 gunsmokingmanDon't get me wrong I like that you are trying to help me. But I see you have edited the script for the german language, but I am from Holland Are there some major error's in the script I made??'Script to Auto Arrange Desktop IconsSet WshShell = WScript.CreateObject("WScript.Shell")'Minimize all open windowsWshShell.Run """C:\Documents and Settings\%USERNAME%\Application Data\Microsoft\Internet Explorer\Quick Launch\Bureaublad weergeven.scf""" WScript.Sleep 1000'Refresh DesktopWshShell.sendkeys "{F5}"WScript.Sleep 500'Auto Sort IconsWshShell.sendkeys "+{F10}"WshShell.sendkeys "S"WshShell.sendkeys "h"I like to try things my self, so I can learn from my misstakes and I now what I am doing with my own system.If I am right this script does everytime an Auto sort of the icons I think I am going to change that in, that it is doing that just once. Gues I have to change the WshShell.sendkeys.I am going to try to just put it in my RunOnceEx with this line REG ADD %KEY%\001 /VE /D "Sort Desktop Icons" /fREG ADD %KEY%\001 /V 1 /D "%systemdrive%\Install\Apps\SortIcon.vbs" /fand try it that way. I thought I had to put some sort .vbs app in my I386 or something. I never guest that it would be that easy.DaRKNeSS
gunsmokingman Posted December 10, 2005 Posted December 10, 2005 No I was using the text file that you posted. That was using C:\ I change that to a varible AppData,this allows the drive to be either D:, E:\ etc plus I added a clean up part to the script.I aslo notice that the sleep was at the end of the run command which on my machine will not run like that.YoursWshShell.Run """C:\Documents and Settings\%USERNAME%\Application Data\Microsoft\Internet Explorer\Quick Launch\Bureaublad weergeven.scf""" WScript.Sleep 1000Mine AppData = Act.ExpandEnvironmentStrings("%Appdata%")AppData = AppData & "\Microsoft\Internet Explorer\Quick Launch\Show Desktop.scf" Act.Run(Chr(34) & AppData & Chr(34))WScript.Sleep 1000This part is the varible Appdata, this will always pass the drive and User name back to the script.C:\Documents and Settings\%USERNAME%\Application Data
DaRKNeSS666NL Posted December 10, 2005 Author Posted December 10, 2005 I have got it!!!! Indeed if I ran the script I was getting an error (line6 Nmb 140). I have counted the symbol numbers. And it was the sleep comand.Just one enter and it launced okee from whitin my RunOnceEx. I am working on some other Apps now if they are ready, I am going to burn (dvdrw) and going to test it for real.I learned a lot this way Thanks for your help.DaRKNeSS
DaRKNeSS666NL Posted December 10, 2005 Author Posted December 10, 2005 I didn't worked with my unatended install geting errors (somthing about line 6 sign 1)But when I am running the script after my setup is finished no problems.I it possible that I must run the script before I install zonealarm?I will try this anyway wish me luck. DaRKNeSS
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now