mike1950r Posted January 9 Posted January 9 Hello, i had this issue several times, that after installing a program the userprofiledir was pointing to: C:\windows\system32\ ... systemprofile But the right location is C:\users\ & $username How can I restore the right location to the userprofledir variable. Thanks lot for assistance. cheers mike
Developers Jos Posted January 9 Developers Posted January 9 Guess it's related to running something with elevated rights? Care to share a script that has this issue? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
mike1950r Posted January 9 Author Posted January 9 This is not a script issue. Just the userprofiledir is not pointing to the right location. How can i repair the failure? I have to set this to the right location. Cheers mike
WildByDesign Posted January 9 Posted January 9 13 minutes ago, mike1950r said: C:\windows\system32\ ... systemprofile Are you running as the built-in Admin account or something? I don't think we can really figure anything out without a reproducible script because everything is correct on mine with that macro.
mike1950r Posted January 9 Author Posted January 9 i run just normal windows. normally everything is fine. but just after installing ilok program the C:\users\ profilename is replaced by C:\windows\system32\ ... systemprofile. so my question is, how to reset this to normal path C:\users\ & $username. cheers mike
Solution Nine Posted January 9 Solution Posted January 9 Unless l am mistaken, this has nothing to do with AutoIt. It is just the installer not behaving as you wanted to. Right? “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
WildByDesign Posted January 9 Posted January 9 Can you test PowerShell see what it reports as your user directory? Open PowerShell and run the following: $HOME
mike1950r Posted January 9 Author Posted January 9 it reports nothing. Just to remind, the problem occurs reproducable after installing ilok license manager. the userprofiledir normally C:\users\ & $username changes to C:\windows\system32\config\systemprofile It's just a nightmare. cheers mike
WildByDesign Posted January 9 Posted January 9 7 minutes ago, mike1950r said: it reports nothing. What about from CMD: echo %USERPROFILE% By the way, is your actual script running as Admin or not?
mike1950r Posted January 9 Author Posted January 9 it reports: C:\windows\system32\config\systemprofile cheers mike
WildByDesign Posted January 9 Posted January 9 So that confirms that it is not AutoIt-related and it seems that software does some things with your OS that seem a little shady. You may have to piece together something. But that depends on what the other stuff reports. Check and see what these report: @AppDataDir @HomeDrive @HomePath @AppDataDir @UserName You would have to put those into a ConsoleWrite to see what shows. I've done some things in the past where I pieced together certain things like: ConsoleWrite(@HomeDrive & "\Users\" & @UserName & @CRLF) But that all depends on if your system is giving those macros the right information that matches. On a side note, I would be very cautious with a software (iLok) that makes changes like this to the OS. mike1950r 1
mike1950r Posted January 9 Author Posted January 9 You're right, bad software. It installs two services: Bonjour service PACE License service If I deactivate PACE License service the problem is gone all variables are then good. But then I cannot run the programs which need this license. thanks lot for your help. cheers mike WildByDesign 1
mike1950r Posted January 9 Author Posted January 9 (edited) How do I update the persistent environment variable back to @HomeDrive & "\Users\" & @UserName with AutoIt3? This is my question. The username is allright. It's HomeDrive and HomePath beeing empty. But it must be possible to setup these system variables. I thought it must be possible with Autoit. Cheers mike Edited January 9 by mike1950r
Developers Jos Posted January 9 Developers Posted January 9 EnvSet() and EnvUpdate() functions? mike1950r 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
mike1950r Posted January 9 Author Posted January 9 (edited) Thanks jos, it seems, that userprofiledir is no system variable. It needs homedrive and homepath to get the right value. Say userprofiledir = homedrive & homepath So the solution for me would be: EnvSet("HOMEDRIVE", "C:") EnvSet("HOMEPATH", "\Users\" & @username) Shutdown($SD_REBOOT) Thanks lot Jos. I knew Autoit has a solution. Cheers mike 🙂 Edited January 9 by mike1950r WildByDesign 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now