Page 1 of 1

Question about running a command for once

Posted: 31 May 2016 12:24
by yusef88
Hi everyone
Can red command run once not every time if the permanent variable is already set?
"_Initialize"
$a = input("User Name","", "test");Perm $user="$a";
"ShareWith $user|:browsenetwork" ::msg "Share <curfolder>? permission:Read" , 1;run "nircmd elevate net share <curfolder>=<curpath> /GRANT:%username%,FULL /GRANT:$user,Read pause"

Re: Question about running a command for once

Posted: 31 May 2016 12:41
by highend
You were close...

Code: Select all

    perm $user;
    if !($user) { $user = input("User Name","", "test"); }

Re: Question about running a command for once

Posted: 31 May 2016 20:25
by yusef88
thanks highend, appreciate your help.