Jump to content
Sign in to follow this  
Queener

The Short-cuts Of ProfileDir

Recommended Posts

Queener

ShellExecute(@UserProfileDir & "\desktop\Maintenance.exe")

 

I have a couple computer with different UserProfile and if I compile it; it will not work on other computers. Was wondering what's the official way to code this so it work on all users computer. If I compile this on pc1 and run it on pc2, it will prompt an error saying it couldn't find the file on C:userspc1userdesktopMaintenance.exe.


Msgbox(0, "Hate", "Just hate it when I post a question and find my own answer after a couple tries. But if I don't post the question, I can't seem to resolve it at all.")

Share this post


Link to post
Share on other sites
water

Does Maintenance.exe exist on the desktop of pc1user?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Queener

yes. On all users Desktop. It is being deployed there automatically on each pc.


Msgbox(0, "Hate", "Just hate it when I post a question and find my own answer after a couple tries. But if I don't post the question, I can't seem to resolve it at all.")

Share this post


Link to post
Share on other sites
JLogan3o13

Hmm...if it is deployed automatically it is probably on the All Users desktop, not each individual's.

 

Try the @DesktopCommonDir macro.

Edited by JLogan3o13

√-1 2^3 ∑ π, and it was delicious!

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites
Queener

thanks; @DesktopDir works perfectly. CommonDir actually uses public profile instead.


Msgbox(0, "Hate", "Just hate it when I post a question and find my own answer after a couple tries. But if I don't post the question, I can't seem to resolve it at all.")

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×