MSFN Forum: Installing autosort.vbs? - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Installing autosort.vbs? Where to put the script? Rate Topic: -----

#1 User is offline   DaRKNeSS666NL 

  • Junior
  • Pip
  • Group: Members
  • Posts: 64
  • Joined: 20-April 04

Posted 09 December 2005 - 09:28 AM

Hi all

I 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

Quote

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 DaRKNeSS

PS; 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 :thumbup :thumbup

Attached File(s)




#2 User is offline   gunsmokingman 

  • MSFN Master
  • Group: Super Moderator
  • Posts: 2,020
  • Joined: 02-August 03
  • OS:none specified
  • Country: Country Flag

Posted 09 December 2005 - 10:42 AM

What method are you using [GUIRunOnce] or the RunOnceEx method.

#3 User is offline   DaRKNeSS666NL 

  • Junior
  • Pip
  • Group: Members
  • Posts: 64
  • Joined: 20-April 04

Posted 09 December 2005 - 04:42 PM

gunsmokingman

I am using the RunOnceEx method to install all of my apps.

DaRKNeSS

#4 User is offline   gunsmokingman 

  • MSFN Master
  • Group: Super Moderator
  • Posts: 2,020
  • Joined: 02-August 03
  • OS:none specified
  • Country: Country Flag

Posted 09 December 2005 - 09:21 PM

I have re edit the script to this
Save as SortIcons.VBS

Quote

Dim Act, AppData, Fso,SD
Set 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.scf
AppData = Act.ExpandEnvironmentStrings("%Appdata%")
AppData = AppData & "\Microsoft\Internet Explorer\Quick Launch\Show Desktop.scf"
'Minimize all open windows
Act.Run(Chr(34) & AppData & Chr(34))
WScript.Sleep 1000
'Refresh Desktop
Act.sendkeys "{F5}"
WScript.Sleep 500
''''' FOR GERMAN LANGUAGE OF WINDOWS
'''''Act.sendkeys "M"
'''''Act.sendkeys "A"
'Auto Sort Icons
Act.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.cmd

Quote

Example Only
for %%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=%%i

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /D "The Install Section" /f

REG ADD %KEY%\000 /VE /D "Preparing Installation..." /f

REG ADD %KEY%\001 /VE /D "Sort Desktop Icons" /f
REG ADD %KEY%\001 /V 1 /D "%CDROM%Apps\SortIcon.vbs" /f

I have included a sfx file with the above script in it so the RunonceEx.cmd
should look like this

Quote

Example Only
for %%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=%%i

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY% /V TITLE /D "The Install Section" /f

REG ADD %KEY%\000 /VE /D "Preparing Installation..." /f

REG ADD %KEY%\001 /VE /D "Sort Desktop Icons" /f
REG ADD %KEY%\001 /V 1 /D "%CDROM%Apps\SortIcon.exe" /f

This post has been edited by gunsmokingman: 31 January 2006 - 05:36 PM


#5 User is offline   DaRKNeSS666NL 

  • Junior
  • Pip
  • Group: Members
  • Posts: 64
  • Joined: 20-April 04

Posted 10 December 2005 - 06:03 AM

gunsmokingman

Don'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 :P
Are there some major error's in the script I made??

'Script to Auto Arrange Desktop Icons

Set WshShell = WScript.CreateObject("WScript.Shell")

'Minimize all open windows
WshShell.Run """C:\Documents and Settings\%USERNAME%\Application Data\Microsoft\Internet Explorer\Quick Launch\Bureaublad weergeven.scf""" WScript.Sleep 1000

'Refresh Desktop
WshShell.sendkeys "{F5}"
WScript.Sleep 500

'Auto Sort Icons
WshShell.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" /f
REG ADD %KEY%\001 /V 1 /D "%systemdrive%\Install\Apps\SortIcon.vbs" /f

and 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

#6 User is offline   gunsmokingman 

  • MSFN Master
  • Group: Super Moderator
  • Posts: 2,020
  • Joined: 02-August 03
  • OS:none specified
  • Country: Country Flag

Posted 10 December 2005 - 06:24 AM

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.

Quote

Yours
WshShell.Run """C:\Documents and Settings\%USERNAME%\Application Data\Microsoft\Internet Explorer\Quick Launch\Bureaublad weergeven.scf""" WScript.Sleep 1000


Quote

Mine
AppData = Act.ExpandEnvironmentStrings("%Appdata%")
AppData = AppData & "\Microsoft\Internet Explorer\Quick Launch\Show Desktop.scf"
Act.Run(Chr(34) & AppData & Chr(34))
WScript.Sleep 1000

This part is the varible Appdata, this will always pass the drive and User name back to the script.

Quote

C:\Documents and Settings\%USERNAME%\Application Data


#7 User is offline   DaRKNeSS666NL 

  • Junior
  • Pip
  • Group: Members
  • Posts: 64
  • Joined: 20-April 04

Posted 10 December 2005 - 08:25 AM

I have got it!!!! :thumbup

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

#8 User is offline   DaRKNeSS666NL 

  • Junior
  • Pip
  • Group: Members
  • Posts: 64
  • Joined: 20-April 04

Posted 10 December 2005 - 10:01 AM

:realmad: :realmad: :realmad:

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

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy