Trying to create the folder in INSTALLDIR location with the name of USER logged in
Scenario: Application creates a runtime folder with logged in username i.e. (C:\INSTALLDIR\[USERNAME])
if the USER name is admin the folder should get creted by name Admin
if the USER name is test the folder should get creted by name test
We have tried creating the folder specific to each USER. Please see our finding what all we have tried:
1) Created a script which will search for the logged in USER and then create the folder in the required location with the User name. The script is running only in Admin not in USER.
2) Added the script in Active Setup. The Active Setup runs for both Admin and USER, and identifies the logged in USER but does not create folder structure with the username (%USERNAME%) in USERs.
3) Added the script in RunOnce key. This key does not run for USER.
4) Added the script in shortcut. In this case whenever the shortcut will be launched it will search for the Logged in USER then search for folder, if the folder is not present in required location it will create the same and then the shortcut will be launched. Working in Admin not in USER.
5) Created a script which calls the main vbscript (logic used for the main vbscript : searches for the logged in USER and creates the folder with the same name in the C:\INSTALLDIR\[USERNAME] as per the above scenario) by using elevated Admin privileges (i.e. UAC prompt), but per user this will give the password prompt to USER.
All of the above steps has been followed by giving full permissions to INSTALLDIR for USER.
Any suggestions are appreciated.