December 19, 201213 yr 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
December 19, 201213 yr You can use:DEL "%SystemDrive%\Users\Public\Desktop\*.lnk"Shorter!%PUBLIC%\DESKTOP
December 20, 201213 yr 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 December 20, 201213 yr by AmazingGecko
December 20, 201213 yr 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.
December 20, 201213 yr Could you attach your config.js file please?Or check the installation path for your batch file! Edited December 20, 201213 yr by myselfidem
December 21, 201213 yr Author Decided to teach myself how to write a .bat file and hey presto - it now works! @echo offREM Deleting Desktop Shortcuts after WPI InstallDEL "%PUBLIC%\DESKTOP\*.lnk"Strange how the same commands work in a .bat file but not from within WMI James
December 22, 201213 yr Some help about path for batch files using WPI:http://www.msfn.org/...ost__p__1007716*Edit: Tested the batch file using with WPI and works fine!Batch file set inside:.\sources\$OEM$\$$\Setup\scripts\Clean.cmd Edited December 22, 201213 yr by myselfidem
December 22, 201213 yr OR!!We could use the code WPI has built in?::{DELETE} "%PUBLIC%\DESKTOP\*.lnk" < --- Yanow in the commandline...
December 25, 201213 yr Author Hi KelAs 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
December 25, 201213 yr Yes, I use also like this!useroptions.js// Tools tabExecuteAfter=['"%systemdrive%\\Windows\\SETUP\\SCRIPTS\\clean.vbs"']; Edited December 25, 201213 yr by myselfidem
December 28, 201213 yr OR!!We could use the code WPI has built in?::{DELETE} "%PUBLIC%\DESKTOP\*.lnk" < --- Yanow in the commandline...Thanks Kels! Works fine.WPI_Log.txtvendredi 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
December 28, 201213 yr 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 December 28, 201213 yr by Kelsenellenelvian
Create an account or sign in to comment