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.

Place executible in System32 folder, and launch it...

Featured Replies

Hi all,

Rather than go through a large explination, I think it would be best if I just describe step by step what I would like done.

1. While windows is being installed, I would like to have an executible file placed in the Sys32 folder.

2. Before the themes setup and such, I would like that executible to be run.

3. If possible, I would like to have a shortcut placed on the desktop.

Can someone explain step by step how to do this? I already know how to do step 2, but I am having trouble with 1, and 3.

Thanks guys.

1. Place the file in your $OEM$\$$\System32 folder and it will be copied over during setup.

3. Use shortcut.exe to make the shortcut. I make shortcuts in my cleanup.cmd. Syntax would be:

shortcut.exe /f:"%allusersprofile%\Desktop\myshortcut.lnk" /a:c /t:"%systemroot%\system32\myfile.exe"

Or you could try a VBS script. This script adds Calc and Cmd to the Quick Launch.

Save MkShortCuts.vbs

'-> Object To Work With
Dim Act :Set Act = CreateObject("Wscript.Shell")
'-> Paths
Dim DTP :DTP = Act.SpecialFolders("Desktop")
Dim QCL :QCL = Act.ExpandEnvironmentStrings("%AppData%\Microsoft\Internet Explorer\Quick Launch")
Dim AUD :AUD = Act.SpecialFolders("AllUsersDesktop")
Dim ASM :ASM = Act.SpecialFolders("AllUsersStartMenu")
Dim AUP :AUP = Act.SpecialFolders("AllUsersPrograms")
Dim S32 :S32 = Act.ExpandEnvironmentStrings("%SystemRoot%\system32")
'-> Varibles For The ShortCuts
Dim Obj, Str
'-> Add Calc ShortCut
Str = S32 & "\calc.exe"
Set Obj = Act.CreateShortcut(QCL & "\Calc.lnk")
Obj.Description = "Open Calc And Do Some Math"
Obj.IconLocation = "calc.exe, 0"
Obj.TargetPath = Str
Obj.Save
'-> Add Cmd ShortCut
Str = S32 & "\cmd.exe"
Set Obj = Act.CreateShortcut(QCL & "\Cmd.lnk")
Obj.Description = "Open Command Prompt"
Obj.IconLocation = "cmd.exe, 0"
Obj.TargetPath = Str
Obj.Save

  • Author

Thanks everyone! Great info! :thumbup

Just one question.

EDIT

@gunsmokingman,

How would you recommend having the VBS script launched?

See, this will be placed on DVD and a Flash Drive. I will most likely use the one on the Flash Drive more often. Because of this, I doubt that %CDROOT% will be an applicable varible for Nlite. Should I have this placed in the Sys32 folder as well? And if so, is there a way to get it to self delete?

Edited by Draygoes

3. If possible, I would like to have a shortcut placed on the desktop.

It can be done by OEM-Method, too.

Create a shortcut to your "my.exe" on the desktop of your running system.

Now copy this shortcut to your $OEM$-Folder at ""$OEM$\$DOCS\DEFAULT USER\Desktop".

The shortcut will be available for all users you create on the new system.

I use that script in my RunOnceEx.cmd

REG ADD %KEY%\080 /VE /D "Add Quick Launch ShortCuts" /f
REG ADD %KEY%\080 /V 1 /D "%CDROM%\Apps\AddCalcCmd.vbs" /f

To make the script Delete it self

Make this your last line in the script.

CreateObject("Scripting.FileSystemObject").DeleteFile(WScript.ScriptFullName),true

  • Author

Thank you for all your patiance and help so far.

As I mentioned before, I am likely to place this in a bootable flash drive. Wouldnt that break this line?

REG ADD %KEY%\080 /V 1 /D "%CDROM%\Apps\AddCalcCmd.vbs" /f

Heres the modified script. I tested it and it works right. I am big into sharing code, and I figured that you would appricate seeing how yours will be used.

'-> Object To Work With
Dim Act :Set Act = CreateObject("Wscript.Shell")
'-> Paths
Dim DTP :DTP = Act.SpecialFolders("Desktop")
Dim QCL :QCL = Act.ExpandEnvironmentStrings("%AppData%\Microsoft\Internet Explorer\Quick Launch")
Dim AUD :AUD = Act.SpecialFolders("AllUsersDesktop")
Dim ASM :ASM = Act.SpecialFolders("AllUsersStartMenu")
Dim AUP :AUP = Act.SpecialFolders("AllUsersPrograms")
Dim S32 :S32 = Act.ExpandEnvironmentStrings("%SystemRoot%\system32")
'-> Varibles For The ShortCuts
Dim Obj, Str
'-> Add Wallpaper Setup ShortCut
Str = S32 & "\setups.exe"
Set Obj = Act.CreateShortcut(AUD & "\Os Setup.lnk")
Obj.Description = "Install software and test the system security."
Obj.IconLocation = "setups.exe, 0"
Obj.TargetPath = Str
Obj.Save
'-> Add Wallpaper Gallery ShortCut
Str = S32 & "\dwallpaperg.exe"
Set Obj = Act.CreateShortcut(AUD & "\Wallpaper Selection Gallery.lnk")
Obj.Description = "View a custom wallpaper gallery in full screen mode, and choose desktop wallpaper."
Obj.IconLocation = "dwallpaperg.exe, 0"
Obj.TargetPath = Str
Obj.Save
'-> Add Cmd ShortCut
Str = S32 & "\cmd.exe"
Set Obj = Act.CreateShortcut(AUD & "\Cmd.lnk")
Obj.Description = "Open Command Prompt"
Obj.IconLocation = "cmd.exe, 0"
Obj.TargetPath = Str
Obj.Save
'-> Add Cmd ShortCut - Quick Launch
Str = S32 & "\cmd.exe"
Set Obj = Act.CreateShortcut(QCL & "\Cmd.lnk")
Obj.Description = "Open Command Prompt"
Obj.IconLocation = "cmd.exe, 0"
Obj.TargetPath = Str
Obj.Save
'-> After everything is said and done, the script is no longer needed. So now we have the script delete itself.
Set objFSO = CreateObject("Scripting.FileSystemObject")
strScript = Wscript.ScriptFullName
objFSO.DeleteFile(strScript)

Edited by Draygoes

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.