Question about running a command for once

Discuss and share scripts and script files...
Post Reply
yusef88
Posts: 1126
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Question about running a command for once

Post 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"

highend
Posts: 13327
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Question about running a command for once

Post by highend »

You were close...

Code: Select all

    perm $user;
    if !($user) { $user = input("User Name","", "test"); }
One of my scripts helped you out? Please donate via Paypal

yusef88
Posts: 1126
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: Question about running a command for once

Post by yusef88 »

thanks highend, appreciate your help.

Post Reply