#188353 - 2008-06-25 04:44 PM
Run command against multiple user profiles
|
Zactek
Fresh Scripter
Registered: 2008-06-25
Posts: 12
|
Essentially, I am trying to run a command through a KIX login script that will run a utility that can delete a specific entry from the NK2 file. This utility is called NK2View. You can use switches from the command line to perform a delete of a record within the NK2 file upon login.
nk2view.exe /delete username@domain.com
I have researched on this and other forums different ways to try and do this, but I have only found code to delete the entire file itself. This example is from a post from NTDOC - $nk2=ReadValue('HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders', 'AppData')
If Exist($nk2+'\Microsoft\Outlook\*.nk2')=1
;Searches for files ending with .NK2 and deletes them.
Del($nk2+'\Microsoft\Outlook\*.nk2')EndIf
Another one of the challenges is also trying to get this to apply to users that are have Windows XP and Vista because the paths are different. I need to get this to run upon logon, so I probably don't need to feed in a list of computer names, but I do need to run this utility remotely against multiple user's computers and multiple profiles. Also, I may have 2 paths because some are still on XP with different versions of Outlook -
[b]Outlook 2000 / 2003 / 2007[/b] - \\%computername%\C$\Documents and Settings\%userprofile%\Application Data\Microsoft\Outlook\outlook.nk2
[b]Microsoft Vista with Outlook[/b] - \\%computername%\C$\Users\%userprofile%\AppData\Roaming\Microsoft\Outlook\outlook.nk2
Anyhow, any help is appreciated.
|
Top
|
|
|
|
#188354 - 2008-06-25 04:50 PM
Re: Run command against multiple user profiles
[Re: Zactek]
|
Kdyer
KiX Supporter
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Zactek,
You should be able to use %APPDATA% as the variable. Just went to a command prompt and typed in SET to see what Environment Variables are available.
Also, you could do this from the Registry:
$AppData = READVALUE('HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders','AppData')
This is also included in Doc's code. Probably the easiest way to do this is at login. Sure, you could do this remotely, but will be more difficult.
HTH,
Kent
Edited by Kdyer (2008-06-25 04:53 PM)
|
Top
|
|
|
|
#188395 - 2008-06-26 04:50 PM
Re: Run command against multiple user profiles
[Re: Zactek]
|
Zactek
Fresh Scripter
Registered: 2008-06-25
Posts: 12
|
This is essentially what I am trying to do within the KiXtart script, but at the command line it is returning a value of zero (0) :
Dim $ServerName, $nk2, $ProfilePath, $SearchString, $SharePath, $ProgramPath, $CmdString, $RunLine, $CmdLine
;
;Edit Variables
;
$ServerName =
;For example $ServerName = "Server1" or "Server1.yourdomain.com"
$nk2 = ReadValue('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders', 'AppData')
$ProfilePath = $nk2+"\Microsoft\Outlook\"
;For example $ProfilePath = "%USERPROFILE%\Application Data\Microsoft\Outlook\Outlook.NK2", or "Null"
$SearchString =
;
;-------------------------------------------------------------------------------------------------------------------------------------------
;-------------------------------------------------------------------------------------------------------------------------------------------
$SharePath = "\\" + $ServerName + "\nk2view\"
$ProgramPath = $SharePath + "nk2view.exe"
;This section fills in the default NK2 path
If $ProfilePath = "Null"
$ProfilePath = "%USERPROFILE%\Application Data\Microsoft\Outlook\Outlook.NK2"
EndIf
If Exist($nk2+'\Microsoft\Outlook\*.bak*')=1
;Searches for files ending with .BAK and that may have anything appended and then stops script if condition is true
Goto EOF
EndIf
If Exist($nk2+'\Microsoft\Outlook\*.nk2')=1
;Searches for files ending with .NK2 and creates backup.
Move($nk2+'\Microsoft\Outlook\*.nk2') ($nk2+'\Microsoft\Outlook\*.bak+@YEAR+@MONTHNO+@MDAYNO+@TIME')
EndIf
$CmdString = $ProgramPath + "/nk2file " + $ProfilePath
:SearchDelete
$Runline = $CmdString + " /delete " + $SearchString
GoTo CmdLine
:CmdLine
Shell $Runline
:EOF
Exit
Exit
|
Top
|
|
|
|
#188402 - 2008-06-26 06:45 PM
Re: Run command against multiple user profiles
[Re: Zactek]
|
Kdyer
KiX Supporter
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
One thing that pops in to my mind is trying to read in the local user's information if you are to run this Remotely. It is pretty easy to do a READVALUE remotely on HKLM, but HKCU is more painful from an Admin side as you have to know the SID..
I did clean up your code a bit too.
DIM $servername, $nk2, $profilepath, $searchstring, $sharepath, $programpath, $cmdstring, $runline, $cmdline
;
;Edit Variables
;
$servername = @lserver
;For example $ServerName = "Server1" or "Server1.yourdomain.com"
$nk2 = ReadValue('HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders', 'AppData')
$profilepath = $nk2+"\Microsoft\Outlook\"
;For example $ProfilePath = "%USERPROFILE%\Application Data\Microsoft\Outlook\Outlook.NK2", or "Null"
$searchstring =
;-------------------------------------------------------------------------------------------------------------------------------------------
;-------------------------------------------------------------------------------------------------------------------------------------------
$sharepath = "\\" + $servername + "\nk2view\"
$programpath = $sharepath + "nk2view.exe"
;This section fills in the default NK2 path
IF NOT EXIST($profilepath)
$profilepath = "%USERPROFILE%\Application Data\Microsoft\Outlook\Outlook.NK2"
ENDIF
IF EXIST($nk2+'\Microsoft\Outlook\*.bak'+@YEAR+@MONTHNO+@MDAYNO+@TIME)
RETURN ; RETURN maybe better than EXIT as RETURN takes you back to where left off
ENDIF
IF EXIST($nk2+'\Microsoft\Outlook\*.nk2')
;Searches for files ending with .NK2 and creates backup.
MOVE $nk2+'\Microsoft\Outlook\*.nk2' $nk2+'\Microsoft\Outlook\*.bak'+@YEAR+@MONTHNO+@MDAYNO+@TIME
$cmdstring = $programpath + "/nk2file " + $profilepath
$runline = $cmdstring + " /delete " + $searchstring
SHELL $runline
ENDIF
HTH,
Kent
|
Top
|
|
|
|
#188409 - 2008-06-26 09:32 PM
Re: Run command against multiple user profiles
[Re: Zactek]
|
Zactek
Fresh Scripter
Registered: 2008-06-25
Posts: 12
|
- I'm still not able to getting this to work. The KiX debug hasn't been that helpful. Here is the tool that I am trying to use - NK2View
Here is the exact code that I am trying to run:
DIM $servername, $nk2, $profilepath, $searchstring, $sharepath, $programpath, $cmdstring, $runline, $cmdline
;
;Edit Variables
;
$servername = ho00060lp57
;For example $ServerName = "Server1" or "Server1.yourdomain.com"
$nk2 = ReadValue('HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders', 'AppData')
$profilepath = $nk2+"\Microsoft\Outlook\"
;For example $ProfilePath = "%USERPROFILE%\Application Data\Microsoft\Outlook\Outlook.NK2", or "Null"
$searchstring = "zactek@msn.com"
;-------------------------------------------------------------------------------------------------------------------------------------------
;-------------------------------------------------------------------------------------------------------------------------------------------
$sharepath = "\\" + $servername + "\nk2view\"
$programpath = $sharepath + "nk2view.exe"
;This section fills in the default NK2 path
IF NOT EXIST($profilepath)
$profilepath = "%USERPROFILE%\Application Data\Microsoft\Outlook\Outlook.NK2"
ENDIF
IF EXIST($nk2+'\Microsoft\Outlook\*.bak'+@YEAR+@MONTHNO+@MDAYNO+@TIME)
RETURN ; RETURN maybe better than EXIT as RETURN takes you back to where left off
ENDIF
IF EXIST($nk2+'\Microsoft\Outlook\*.nk2')
;Searches for files ending with .NK2 and creates backup.
MOVE $nk2+'\Microsoft\Outlook\*.nk2' $nk2+'\Microsoft\Outlook\*.bak'+@YEAR+@MONTHNO+@MDAYNO+@TIME
$cmdstring = $programpath + "/nk2file " + $profilepath
$runline = $cmdstring + " /delete " + $searchstring
SHELL $runline
ENDIF
The only thing that I changed was using my local computer name and my personal e-mail address in the $searchString. There is a share on my computer that I have rights to with the name of "nk2view".
|
Top
|
|
|
|
#188411 - 2008-06-26 10:24 PM
Re: Run command against multiple user profiles
[Re: Zactek]
|
Kdyer
KiX Supporter
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
OK.. I think we need to revisit a couple of things here..
You are doing a MOVE, which means that you are taking a file and moving it to another name. So, how can nk2view act on the file when it is renamed or moved to another name?
Debugging is a cinch in KiX.. You can initiate a debug on in your script.. You can then look at the resulting @error and @serror macros to see what is going on.
Also, you can do kix32 /d yourscript.kix
This stuff is discussed in the FAQ Forum..
So.. Here is what I have put together so far (still not working, but closer):
BREAK ON
CLS
DIM $servername, $nk2, $profilepath, $searchstring, $sharepath, $programpath, $cmdstring, $runline, $cmdline
;
;Edit Variables
;
$servername = ho00060lp57
;For example $ServerName = "Server1" or "Server1.yourdomain.com"
$AppD = ReadValue('HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders', 'AppData')
???$AppD
$profilepath = $AppD+"\Microsoft\Outlook\"
;For example $ProfilePath = "%USERPROFILE%\Application Data\Microsoft\Outlook\Outlook.NK2", or "Null"
$searchstring = "test@test.com"
;-------------------------------------------------------------------------------------------------------------------------------------------
;-------------------------------------------------------------------------------------------------------------------------------------------
$sharepath = @scriptdir + "\"
;$sharepath = "\\" + $servername + "\nk2view\"
$programpath = $sharepath + "nk2view.exe"
;This section fills in the default NK2 path
IF NOT EXIST($profilepath)
$profilepath = "%USERPROFILE%\Application Data\Microsoft\Outlook\Outlook.NK2"
ENDIF
IF EXIST($AppD+'\Microsoft\Outlook\*.bak'+@YEAR+@MONTHNO+@MDAYNO+@TIME)
RETURN ; RETURN maybe better than EXIT as RETURN takes you back to where left off
ENDIF
IF EXIST($AppD+'\Microsoft\Outlook\*.nk2')
;Searches for files ending with .NK2 and creates backup.
; -- You want to do a copy to backup before messing with the file...
debug on
???'"'+$profilepath+'*.NK2'+'"'
CD $profilepath
COPY '"'+'*.NK2'+'"' '"'+'*.bak'+'"'
;COPY "MyDir\file*.txt" "MyDir\file*.bak"
???@SERROR+@ERROR
;MOVE $AppD+'\Microsoft\Outlook\*.nk2' $AppD+'\Microsoft\Outlook\*.bak'+@YEAR+@MONTHNO+@MDAYNO+@TIME
$cmdstring = $programpath + "/nk2file " + $profilepath
$runline = $cmdstring + " /delete " + $searchstring
SHELL $runline
ENDIF
get $
HTH,
Kent
Edited by Kdyer (2008-06-26 10:57 PM)
|
Top
|
|
|
|
#188412 - 2008-06-26 10:55 PM
Re: Run command against multiple user profiles
[Re: Kdyer]
|
Kdyer
KiX Supporter
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
OK.. Spent some time on this for you.. It now works..
BREAK ON
CLS
DIM $servername, $nk2, $profilepath, $searchstring, $sharepath, $programpath, $cmdstring, $runline, $cmdline
;
;Edit Variables
;
$servername = ho00060lp57
;For example $ServerName = "Server1" or "Server1.yourdomain.com"
$AppD = ReadValue('HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders', 'AppData')
???$AppD
$profilepath = $AppD+"\Microsoft\Outlook\"
;For example $ProfilePath = "%USERPROFILE%\Application Data\Microsoft\Outlook\Outlook.NK2", or "Null"
; NOTE: Don't forget to double up the @@ for an e-mail address
$searchstring = "test@@test.com"
;-------------------------------------------------------------------------------------------------------------------------------------------
;-------------------------------------------------------------------------------------------------------------------------------------------
$sharepath = "c:\!KIX\"
;$sharepath = "\\" + $servername + "\nk2view\"
$programpath = $sharepath + "nk2view.exe"
;This section fills in the default NK2 path
IF NOT EXIST($profilepath)
$profilepath = "%USERPROFILE%\Application Data\Microsoft\Outlook\Outlook.NK2"
ENDIF
IF EXIST($AppD+'\Microsoft\Outlook\*.bak'+@YEAR+@MONTHNO+@MDAYNO+@TIME)
RETURN ; RETURN maybe better than EXIT as RETURN takes you back to where left off
ENDIF
IF EXIST($AppD+'\Microsoft\Outlook\*.nk2')
;Searches for files ending with .NK2 and creates backup.
; -- You want to do a copy to backup before messing with the file...
; -- You may also do a check to insure Outlook is closed before proceeding
debug on
SHELL '%COMSPEC% /C COPY "'+$profilepath+'*.NK2" "'+$profilepath+'*.bak"'
;COPY "MyDir\file*.txt" "MyDir\file*.bak"
???@SERROR+@ERROR
;MOVE $AppD+'\Microsoft\Outlook\*.nk2' $AppD+'\Microsoft\Outlook\*.bak'+@YEAR+@MONTHNO+@MDAYNO+@TIME
; NOTE: You may run into a problem with multiple nk2 files... '*.NK2"'
$cmdstring = $programpath + ' /nk2file "' + $profilepath+'*.NK2"'
?$cmdstring
$runline = $cmdstring + ' /delete ' + $searchstring
?$RUNLINE
SHELL $runline
???@SERROR+@ERROR
ENDIF
get $
HTH,
Kent
Edited by Kdyer (2008-06-26 10:57 PM)
|
Top
|
|
|
|
#188414 - 2008-06-26 11:47 PM
Re: Run command against multiple user profiles
[Re: Zactek]
|
Zactek
Fresh Scripter
Registered: 2008-06-25
Posts: 12
|
Kent, It looked like that it copied the file and made the *.bak, but the application that I am using didn't delete the entry from the NK2 file even when I used "zactek@@msn.com" in the $searchString variable. Also, is there a way to append a unique value to the end of the backup file? I was initially thinking like date/time and then try to delete any backup files that were before that iterations date/time if we ran this multiple times. It's time for the MountainDew for me...
Thanks for all your help! Zach
|
Top
|
|
|
|
#188429 - 2008-06-27 04:16 PM
Re: Run command against multiple user profiles
[Re: Zactek]
|
Kdyer
KiX Supporter
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Hang tight.. I am going to look at something a bit different for you.
Kent
|
Top
|
|
|
|
#188431 - 2008-06-27 04:41 PM
Re: Run command against multiple user profiles
[Re: Kdyer]
|
Kdyer
KiX Supporter
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
OK.. Got it.. Need to use the following UDF: WSHPIPE.
Here is the code..
BREAK ON
CLS
DIM $servername, $nk2, $profilepath, $searchstring, $sharepath, $programpath, $cmdstring, $runline, $cmdline
;
;Edit Variables
;
$servername = ho00060lp57
;For example $ServerName = "Server1" or "Server1.yourdomain.com"
$AppD = ReadValue('HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders', 'AppData')
???$AppD
$profilepath = $AppD+"\Microsoft\Outlook\"
;For example $ProfilePath = "%USERPROFILE%\Application Data\Microsoft\Outlook\Outlook.NK2", or "Null"
$searchstring = "you@@domain.com"
;-------------------------------------------------------------------------------------------------------------------------------------------
;-------------------------------------------------------------------------------------------------------------------------------------------
$sharepath = "c:\!KIX\"
;$sharepath = "\\" + $servername + "\nk2view\"
$programpath = $sharepath + "nk2view.exe"
;This section fills in the default NK2 path
IF NOT EXIST($profilepath)
$profilepath = "%USERPROFILE%\Application Data\Microsoft\Outlook\Outlook.NK2"
ENDIF
IF EXIST($AppD+'\Microsoft\Outlook\*.bak'+@YEAR+@MONTHNO+@MDAYNO+@TIME)
RETURN ; RETURN maybe better than EXIT as RETURN takes you back to where left off
ENDIF
IF EXIST($AppD+'\Microsoft\Outlook\*.nk2')
;Searches for files ending with .NK2 and creates backup.
; -- You want to do a copy to backup before messing with the file...
;;debug on
??$profilepath
;;SHELL '%COMSPEC% /C COPY "'+$profilepath+'*.NK2" "'+$profilepath+'*.bak"'
;COPY "MyDir\file*.txt" "MyDir\file*.bak"
; -- LOOK FOR NK2 FILES
???@SERROR+@ERROR
;MOVE $AppD+'\Microsoft\Outlook\*.nk2' $AppD+'\Microsoft\Outlook\*.bak'+@YEAR+@MONTHNO+@MDAYNO+@TIME
; NOTE: You may run into a problem with multiple nk2 files... '*.NK2"'
$rc=WshPipe('%comspec% /c dir /b "'+$profilepath+'*.NK2"',1)
for each $line in $rc
if not instr($line, "File Not Found")
? $line
;>>
$cmdstring = $programpath + ' /nk2file "' + $profilepath+$line + '"'
$runline = $cmdstring + ' /delete ' + $searchstring
SHELL $runline
???@SERROR+@ERROR
;>>
endif
next
@ERROR " | " @SERROR ?
ENDIF
?'Process is complete'
get $
HTH,
Kent
|
Top
|
|
|
|
#188439 - 2008-06-27 07:26 PM
Re: Run command against multiple user profiles
[Re: Kdyer]
|
Zactek
Fresh Scripter
Registered: 2008-06-25
Posts: 12
|
Kent,
When I tried to execute from the command line, but I got -
The operation completed successfully.0 ERROR : expected ')'! Script: C:\NK2View\nk2view_new.kix Line : 43
The only change that I made was to use my computer and path. This appears to be the line for the start of your WshPipe UDF.
Thank You, Zach Crawford
|
Top
|
|
|
|
#188440 - 2008-06-27 07:29 PM
Re: Run command against multiple user profiles
[Re: Zactek]
|
Kdyer
KiX Supporter
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Zach,
Note the link for the WSHPIPE UDF above. You will need to go copy/paste that into the script as it is a separate "User Defined Function".
BTW, it is not my script.
HTH,
Kent
|
Top
|
|
|
|
#188443 - 2008-06-27 08:45 PM
Re: Run command against multiple user profiles
[Re: Zactek]
|
Zactek
Fresh Scripter
Registered: 2008-06-25
Posts: 12
|
Kent,
I added the UDF code from that post I mentioned and the executable ran successfully and deleted the NK2 file entry. Now I need some help on the copy, move, rename of the file. Basically the intent of the script is to check to see if there are any *.bak files in the %APPDATA%\Microsoft\Outlook\ folder and if not, create a copy of the file and rename it to *.bak with appended information and then run an application that is used to remove an entry from the original NK2 file. I am also looking for a way to get all NK2 files, back them up and then run this utility against the original. I am not sure if something like this would help get around some of the technical challenges of getting "everything".
$PrfName = ReadValue ("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles","DefaultProfile")
$nk2 = "%APPDATA%\Microsoft\Outlook\" + $prfname + ".nk2"
I appreciate yours and anyone else's help on this! Thank You, Zach Crawford
|
Top
|
|
|
|
#188447 - 2008-06-27 10:30 PM
Re: Run command against multiple user profiles
[Re: Kdyer]
|
Kdyer
KiX Supporter
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Zach,
(1) The WSHPIPE UDF gives you a facility to look for each file that exists in a user profile, back up the file, act on it and then go to the next.
(2) I would become familiar with the UDF Libarary (it is your KiXtart friend!).. UDF Libary
The UDF Libary in the discussion forum is a bit cumbersome for navigation to put together a list of UDFs and if you read the first post from NTDOC, he explains about the parsed out list of UDFs with an included search tool as well. UDF Library Collection Sites - Sorted List of UDF
http://www.kixtart.org/UDF is the whole collection of UDFs.
Hmm.. Check this out.. This may help in enumerating profiles remotely. Profile list
Thanks,
Kent
Edited by Kdyer (2008-06-27 11:12 PM)
|
Top
|
|
|
|
#188481 - 2008-06-30 03:45 PM
Re: Run command against multiple user profiles
[Re: Kdyer]
|
Zactek
Fresh Scripter
Registered: 2008-06-25
Posts: 12
|
Kent,
I appreciate you pointing out some more of the resources on KiXtart website. I am just unsure about the first statement in your post because I don't know exactly how to use it to copy / backup each NK2 file within that function. This is the code that I have where it does run the application I'm using, but it doesn't copy / backup the NK2 file. When I do the backup, I need to find a way to append a unique value to the end of the file extension (e.g. Outlook.NK2_A1). I want to copy this file to another location (e.g. %SYSTEMDRIVE%\alfascript\ ) Any more help is appreciated!
BREAK ON
CLS
DIM $servername, $nk2, $profilepath, $searchstring, $sharepath, $programpath, $cmdstring, $runline, $cmdline
;
;Edit Variables
;
$servername = ho00060lp57
;For example $ServerName = "Server1" or "Server1.yourdomain.com"
$AppD = ReadValue ("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles","DefaultProfile")
$profilepath = $AppD+"\Microsoft\Outlook\"
;For example $ProfilePath = "%USERPROFILE%\Application Data\Microsoft\Outlook\Outlook.NK2", or "Null"
$searchstring = "zactek@@msn.com"
;-------------------------------------------------------------------------------------------------------------------------------------------
;-------------------------------------------------------------------------------------------------------------------------------------------
$sharepath = "\\" + $servername + "\nk2view\"
$programpath = $sharepath + "nk2view.exe"
;This section fills in the default NK2 path
IF NOT EXIST($profilepath)
$profilepath = "%USERPROFILE%\Application Data\Microsoft\Outlook\Outlook.NK2"
ENDIF
IF EXIST($AppD+'\Microsoft\Outlook\*.bak'+@YEAR+@MONTHNO+@MDAYNO+@TIME)
RETURN ; RETURN maybe better than EXIT as RETURN takes you back to where left off
ENDIF
IF EXIST($AppD+'\Microsoft\Outlook\*.nk2')
;Searches for files ending with .NK2 and creates backup.
; -- You want to do a copy to backup before messing with the file...
;;debug on
??$profilepath
;;SHELL '%COMSPEC% /C COPY "'+$profilepath+'*.NK2" "'+$profilepath+'*.bak"'
;COPY "MyDir\file*.txt" "MyDir\file*.bak"
; -- LOOK FOR NK2 FILES
???@SERROR+@ERROR
COPY $AppD+'\Microsoft\Outlook\*.nk2' $AppD+'\Microsoft\Outlook\*.bak'
; NOTE: You may run into a problem with multiple nk2 files... '*.NK2"'
Function WshPipe($ShellCMD, OPTIONAL $NoEcho)
Dim $oExec, $Output
$oExec = CreateObject("WScript.Shell").Exec($ShellCMD)
If Not VarType($oExec)=9 $WshPipe="WScript.Shell Exec Unsupported" Exit 10 EndIf
$Output = $oExec.StdOut.ReadAll + $oExec.StdErr.ReadAll
If Not $NoEcho $Output Endif
$WshPipe=Split(Join(Split($Output,CHR(13)),''),CHR(10))
Exit($oExec.ExitCode)
EndFunction
$rc=WshPipe('%comspec% /c dir /b "'+$profilepath+'*.NK2"',1)
for each $line in $rc
if not instr($line, "File Not Found")
? $line
;>>
$cmdstring = $programpath + ' /nk2file "' + $profilepath+$line + '"'
$runline = $cmdstring + ' /delete ' + $searchstring
SHELL $runline
???@SERROR+@ERROR
;>>
endif
next
@ERROR " | " @SERROR ?
ENDIF
?'Process is complete'
get $
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 980 anonymous users online.
|
|
|