Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

SmallIcon Desktop with AutoUnattented

Featured Replies

Hi every one!

In my automatic installation, i will to setting the small Icon of the desktop!

--> I try the first solution : have 3 files

File name : RunVBS.VBS

Set WshShell = CreateObject("Wscript.Shell")Set ofs = CreateObject("Scripting.FileSystemObject")strScriptDir = ofs.GetParentFolderName(Wscript.ScriptFullName)strFile = strScriptDir & "\SmallIcon.vbs"WshShell.Run "C:\Windows\System32\cscript.exe " & Chr(34) & strFile & Chr(34)wscript.sleep 2000strFilea = strScriptDir & "\ReStartExploreWin.vbs"WshShell.Run "C:\Windows\System32\cscript.exe " & Chr(34) & strFilea & Chr(34)

File name : SmallIcon.VBS

'Petite taille : valeur décimal : 32 - valeur Héxadécimal : 20'Moyenne taille : valeur décimal : 48 - valeur Héxadécimal : 30'Grande taille : valeur décimal : 96 - valeur Héxadécimal : 60'-- Il faut kill explorer puis le relancer!Option ExplicitDim objShell, strRoot, strRoot1, strModify, strDeletestrRoot = "HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Bags\1\Desktop\IconSize"strRoot1 = "HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics\Shell Icon Size"' Create the Shell objectSet objShell = CreateObject("WScript.Shell")strModify = objShell.RegWrite(strRoot,"00000032", "REG_DWORD")'WScript.Echo "Error No: " & err.number & " check " & strRootstrModify = nullstrModify = objShell.RegWrite(strRoot1,"32", "REG_SZ")'WScript.Echo "Error No: " & err.number & " check " & strRoot1strModify = nullWScript.Quit' End of .RegWrite example script.

File name : ReStartExploreWin.vbs

On Error Resume Next' Kill Explorer.exestrComputer = "."Set objWMIService = GetObject("winmgmts:" _    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")Set colProcessList = objWMIService.ExecQuery _    ("Select * from Win32_Process Where Name = 'explorer.exe'")For Each objProcess in colProcessList    objProcess.Terminate(1)Next' Launch Explorer.exeSet objShell = CreateObject("Wscript.Shell") objShell.Run "explorer.exe" Set objShell = NothingWscript.exit

--> I try the second solution : have 3 files

File name : REG_RUN.VBS

wscript.exe "c:\vbs\smallicondesktop\invisible.vbs" "c:\vbs\smallicondesktop\iconbur.bat"

File name : Invisible.VBS

CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False

File name : IconBur.Bat

@echo off taskkill /im explorer.exe /f reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Bags\1\Desktop" /v IconSize /t REG_DWORD /d 00000032 /f "%windir%\explorer.exe"

With the two solution not work when the automatique installation finish!

I have only windows CLI open!

But when i use it, it work fine!

I try solution with SetupComplete.CMD, it not work to!

I think we should wait for the full automatic configuration of the office to start my three files. would anyone please an idea or solution. thank you in advance


  • Author

sur! the two pack of the script i start from

Microsoft-Windows-Shell-Setup | FirstLogonCommands

and the tirth test is the file SetupComplete.CMD!

not work in this way!

thank you in advance for your suggestion

  • Author
that is writing the launch of the VBS file is just in AutoUnattend.xml?


<settings pass="oobeSystem">

...

<SynchronousCommand wcm:action="add">

<Description>IconSize Desktop</Description>

<CommandLine>cmd /k start "" /wait cscript %SystemDrive%\VBS\SmallIconDeskTop\script1.vbs</CommandLine>

<Order>2</Order>

</SynchronousCommand>

...

</settings>


thank you in advance for your answwer

I would use 1 .cmd file and put all your code in it. You can even send output to a file using > operator to see which specific commands are failing. Then reference your .cmd in the FirstLogonCommands.

I presume your scripts work find if you run them manually? For reference, you may be running into a permissions or Session 0 issue.

FirstLogonCommands executes as the logon user (Session 1)

Setupcomplete.cmd executes as the LOCAL SYSTEM (Session 0)

  • Author

thank you for oyur answer!

please, can you give more information because is new for me!

you mean, i must put my code vbs or link runing my vbs file into file cmd

and make the runing file cmd in the commande FirstLogonCommands of specialize section?

what is the permission please!

thank you in advance of your answer!

FirstLogonCommands is in the oobeSystem pass. Put all your commands into a .cmd and then have this in your XML:

			<FirstLogonCommands>                <SynchronousCommand wcm:action="add">                    <Order>1</Order>                    <Description>Run vbs from cmd</Description>                    <CommandLine>cmd /C start /wait c:\path\FirstLog.cmd</CommandLine>                </SynchronousCommand>            </FirstLogonCommands>
I don't use VBS myself because of security messages. Example of how to put VBS into CMD:

cscript c:\path\RunVBS.VBS
Or use wscript if you want.
  • 2 weeks later...

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.