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.

Which Script Variable to use with Windows 7 Install

Featured Replies

After reading several threads and posts I need some clarification on the following:

I want to use a script that will tell WPI to execute after it installs all my apps that will remove all the desktop shortcuts. The general thought is to use -

del /s/q "%allusersprofile%\Desktop\*.lnk"

However, research on the web says that the variable %allusersprofile% has changed in Windows 7 to %programdata%. Can anyone confirm this and if so does the rest of the script change in any way?

James

  • Author

Ok, tried the following scripts:

DEL "%PUBLIC%\DESKTOP\*.lnk"

DEL "%SystemDrive%\Users\Public\Desktop\*.lnk"

del /s/q "%allusersprofile%\Desktop\*.lnk"

and it fails every time with the returned code:

(returned code 999)

Any ideas?

Edited by AmazingGecko

  • Author

I've noticed others also having issues with using this script but when inserted into a bat file and run it worked fine. I have no experience with writing bat files but if someone could give me some pointers on what and where to save it I'm sure I could resolve this.

Could you attach your config.js file please?

Or check the installation path for your batch file!

Edited by myselfidem

  • Author

Decided to teach myself how to write a .bat file and hey presto - it now works!

@echo off

REM Deleting Desktop Shortcuts after WPI Install

DEL "%PUBLIC%\DESKTOP\*.lnk"

Strange how the same commands work in a .bat file but not from within WMI :wacko:

James

  • Author

Hi Kel

As I stated above I did use your suggestion to no avail. I'm starting to wonder if I'm putting in the wrong place. I didn't want to have to add that command to every individual app command page so I put it in the "Execute after" entry on the Options/Tools tab.

Is that the wrong place?

James

Yes, I use also like this!

useroptions.js


// Tools tab
ExecuteAfter=['"%systemdrive%\\Windows\\SETUP\\SCRIPTS\\clean.vbs"'];

Edited by myselfidem

OR!!

We could use the code WPI has built in?::

{DELETE} "%PUBLIC%\DESKTOP\*.lnk" < --- Yanow in the commandline...

Thanks Kels! Works fine.

WPI_Log.txt


vendredi 28 décembre 2012 09:34:35
Programme: Ashampoo
ID unique: ASHAMPOO
Ordre: 000001
Catégorie: Applications
vendredi 28 décembre 2012 09:34:58 - cmd1 Succès (Code de retour 0): "C:\WPI_v8.6.3\Install\abs6_free.exe"
vendredi 28 décembre 2012 09:34:58 - Installation terminée.

-----

vendredi 28 décembre 2012 09:34:58
Programme: Clean
ID unique: CLEAN
Ordre: 000002
Catégorie: Applications
vendredi 28 décembre 2012 09:34:59 - cmd1 Succès (Code de retour 0): CMD /C DEL /F /Q "C:\Users\Public\DESKTOP\*.lnk"
vendredi 28 décembre 2012 09:35:01 - Installation terminée.

-----

Nombre d'installations échouées: 0

OK for SOME unremembered reason we didn't add the special command support in the execute after and before lines.

So for cmd styles you would add the ACTUAL command:

Execute after:

Regedit /s %path%\reg.reg

(As noted in recent post I am not actively developing WPI for a long time so who knows when that will change?)

Edited by Kelsenellenelvian

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.