Jump to content

Recommended Posts

Posted

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

Posted

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

Posted
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.

Posted

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
Posted

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

Posted

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.

Posted

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

Posted (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 by mike1950r
Posted (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 by mike1950r

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
×
×
  • Create New...