ildar-shaimordanov / psubst

Associates a path with a drive letter and extends the standard SUBST command allowing to create persistent substituted drives between startups
MIT License
170 stars 40 forks source link

Use SUBST when defining a new drive so the reboot won't be immediately required to begin using the new drive #23

Closed al20878 closed 2 years ago

al20878 commented 2 years ago

It looks like defining a new drive with this script requires a reboot for the registry setting to take effect (while regular SUBST'ed drives are available right away). Suggested is to use SUBST, in addition, with the same command line arguments so that the new drive becomes immediately accessible (and will later persist through the reboot via the registry setting). Thanks for considering.

ildar-shaimordanov commented 2 years ago

@al20878, thank you for your interest to this tool.

You can run the script twice: the first time for persisting a drive and the second one for using it immediately:

psubst h: "%USERPROFILE%" /p
psubst h: "%USERPROFILE%"

Probably you'll need elevated privileges with the /pf option instead '/p in the first command.

I guess it's not explained enough and README is required to be rewrited. Later I'll do this.

al20878 commented 2 years ago

I thought that one command should do one thing as making a new drive available. I don't need a second invocation of "psubst" to make the drive ready right away, the standard "subst" would do it just fine for me, followed by "psubst" with "/P" if I wanted to make that assignment permanent. Anyways, it's not an issue per se, was just merely a suggestion. Thanks for your prompt response, though.