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.

How to determine current user profile via script?

Featured Replies

Greetings all. Thanks for such great efforts and answers from knowledgeable people.

I'm writing a script to install a group of maintenance apps (Ad-aware, Spybot, etc.). The install part is perfect now and does all I need it to do. However, I'm working on the cleanup part now. After all the apps are installed they create shortcuts all over the desktop and start menu. Is there any way to determine via a script or command what user profile the script was run under and automatically have it delete the shortcuts and folders from the startup menu?

something like:

Del \documents and settings\%currentuser%\desktop\ad-aware se personal


Well you can make use of the USERPROFILE and USERNAME environment variables to determine the profile paths...

%userprofile% = C:\documents and settings\FRED (Fred is the current user logged on)

%AllUsersProfile% = C:\documents and settings\All Users

make sure u add quotes around it

DEL /Q /S "%userprofile%\something.lnk"

  • Author

DUDE! You rock! :-) I can't wait to get home and try this out. The script is coming along nicely. I ahev a few qerks to work through, but so far it's proving a HUGE time saver.

I have a question. I was trying to delete "Ad-aware SE Personal" icon from my desktop via a DOS prompt and was having NO luck.

I tried:

del C:\my path\ad-awa~1.lnk

del C:\my path\ad~1.link

del C:\my path\ad-aware SE Personal.lnk

del C:\my path\"ad-aware SE Personal.lnk"

del C:\my path\'ad-aware SE Personal.lnk'

and about 90 other versions and never could determine the right file name.

Is there any way to make 2K or XP display the DOS name of a file? It showed me the long file name in my directory (Which of course I could not delete using.)

Thanks again for such great help.

joe

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.