Jump to content

@UserProfileDir ...


CyberSlug
 Share

Recommended Posts

I might be the only user this affects, but @UserProfileDir returns the wrong directory on my computer becuase I always use TweakUI to put my Desktop folder on a different hard drive (since I use it for temporary downloads and working files)....

script_parser_exp.cpp uses Util_RegReadString(HKEY_CURRENT_USER, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "Desktop", _MAX_PATH, szValue); to get the value...

Perhaps other locations could be checked (such as "Favorites" or "SendTo") and @UserProfileDir could return whatever matches the best 2 out of 3 paths or best 3 out of 5....

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

Confirm the same here CS,

I have desktop, favorites, cookies and my documents on D drive.

%userprofile% = c:\documents and settings\MHz (original profile confirmed through run command)

@userprofiledir = d:\documents and settings (where other folders are with autoit)

strange?

Link to comment
Share on other sites

The CMD shortcut in startmenu uses %HOMEDRIVE%%HOMEPATH%.

Perhaps that is how %userprofile% generates it's setting with %HOMEDRIVE%%HOMEPATH%?

Maybe @userprofile as well?

In here?

[HKEY_CURRENT_USER\Volatile Environment]

Homedrive =

Homepath =

Link to comment
Share on other sites

This should be in Bug thread perhaps?

1. Temporary fix for @UserProfileDir (Autoit Bug)

Changing the registry works for Autoit compiled executables. Change your name to your personal profile name.

Seems to reset after a reboot. So running Autoit compiled executables with @UserProfileDir after reboot will fail.

e.g.

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]

"Desktop"="C:\\Documents and Settings\\<YourName>\\Desktop"

2. Fix for %UserProfile%\Desktop , My Documents etc. (Microsoft Bug)

Create shortcuts to your initial user profile directory pointing to your moved profile folders.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...