|
|
|||||||
Hi, I'm going crazy! I want to create a share from a value retrieved from the registry. The value is a directory of the type c: documents and settingtoto my documents The recup of the value does it well. on the other hand impossible to create sharing. Where did I plant? The problem seems to come from the fact that the path has spaces, that's why I put the variable between "" when passing the NET SHARE command . Here is the part that goes wrong in my script $ TEST = readvalue ("HKEY_CURRENT_USERsoftwaremicrosoftwindowscurrentversion explorershell folders", "personal" $ TEST ? RUN "NET SHARE BACKUP =" $ TEST "" Thanks in advance for your help |
||||||||
|
|
|||||||
Why do you have a space between '$' and 'TEST?' |
||||||||
|
|
|||||||
Also missing some slashes and a closing parenthesis. Hopefully this is just a copy/paste error. |
||||||||
|
|
|||||||
Perhaps give this a shot. Code: $TEST = ReadValue("HKEY_CURRENT_USER\software\microsoft\windows\currentversion\explorer\shell folders","personal") $cmd = '%comspec% /c NET SHARE BACKUP="' + $TEST + '"' Shell $cmd |