Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

{REQ}Install .NETFramework 2

- - - - -

  • Please log in to reply
27 replies to this topic

#1
MgmTest

MgmTest

    Junior

  • Member
  • Pip
  • 61 posts
  • Joined 13-January 12
  • OS:Windows 7 x86
  • Country: Country Flag

hi.
Me Need install .Net 2 In Win XP And Install .Net 3.5 In Win 8&8.1.
plz help me fixed code.
thanks a lot.

@ECHO off
cls
set DOTNETINSTALLED=NO

REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\Policy\v2.0" >NUL && set DOTNETINSTALLED=YES

IF %DOTNETINSTALLED%==YES goto MAIN
goto PREREQUISITE

:PREREQUISITE
REM Execute Prerequisite Setup Program
START /wait Dot_NET_2.exe /q



ping -n 20 127.0.0.1 > NULL

:MAIN
REM Execute Main Setup Program
START /wait test.exe



How to remove advertisement from MSFN

#2
gunsmokingman

gunsmokingman

    MSFN Master

  • Super Moderator
  • 2,419 posts
  • Joined 02-August 03
  • OS:none specified
  • Country: Country Flag
Here is another way of checking for .Net Framework is on a computer using VBS scriptingand using WMI query.
Tested this on Windows 7 and it returns the if True message

Example ChkNetFrameWork.vbs
'-> Runtime Objects
 Dim Act :Set Act = CreateObject("Wscript.Shell")
 Dim Wmi :Set Wmi = GetObject("winmgmts:\\.\root\CIMV2") 
'-> Runtime Varibles
 Dim Net, Obj, Var
 Net = False
'-> Loop Threw Installed Products
  For Each Obj In Wmi.ExecQuery("SELECT * FROM Win32_Product")
'-> Found A Version Of .Net Framework
   If Instr(1,Obj.Caption,".net",1) Then 
    Net = True
    Var = Var & Obj.Caption & " - " & Obj.Version & vbCrLf 
   End if 
  Next
'-> Confirm .Net Framework Installed  
  If Net = True Then 
   Act.Popup "A version of .Net Framework was Found" & vbCrLf & _
   Var,10,".Net Framework Installed",4128
  Else
'-> Code Here If .Net Framework Is Not Installed
'-> Example Below On How To Use The VBS Object Act To Run A Install
'-> Act.Run("Path:\To\The\File.exe /Switches"),1,True
  End If 
Rename ChkNetFrameWork.vbs.txt to ChkNetFrameWork.vbs to make active
Attached File  ChkNetFrameWork.vbs.txt   837bytes   3 downloads


GunSmokingMan



#3
Yzöwl

Yzöwl

    Wise Owl

  • Super Moderator
  • 4,540 posts
  • Joined 13-October 04
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

The Microsoft recommended registry key method is to check:

Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727 Value: Install, Type: REG_DWORD, Data: 1



#4
MgmTest

MgmTest

    Junior

  • Member
  • Pip
  • 61 posts
  • Joined 13-January 12
  • OS:Windows 7 x86
  • Country: Country Flag

I write exe with c#.
I have this problem that .net framework2 be installed automatically in windows xp and .net farmework 3.5 in windows 8 & windows 8.1. I mean I want my exe recognize what is OS then according OS install appropriate .netfaramework.



#5
gunsmokingman

gunsmokingman

    MSFN Master

  • Super Moderator
  • 2,419 posts
  • Joined 02-August 03
  • OS:none specified
  • Country: Country Flag
Perhaps this might work

ChkNetFrameWork2.vbs.txt
'-> Runtime Objects
 Dim Act :Set Act = CreateObject("Wscript.Shell")
 Dim Wmi :Set Wmi = GetObject("winmgmts:\\.\root\CIMV2") 
'-> Runtime Varibles
 Dim Net, Obj, Var
 Net = False
'-> Loop Threw Installed Products
  For Each Obj In Wmi.ExecQuery("SELECT * FROM Win32_Product")
'-> Found A Version Of .Net Framework
   If Instr(1,Obj.Caption,".net",1) Then 
    Net = True
    Var = Var & Obj.Caption & " - " & Obj.Version & vbCrLf 
   End if 
  Next
'-> Confirm .Net Framework Installed  
  If Net = True Then 
   Act.Popup "A version of .Net Framework was Found" & vbCrLf & _
   Var,10,".Net Framework Installed",4128
  Else
'-> Code Here If .Net Framework Is Not Installed
'-> Example Below On How To Use The VBS Object Act To Run A Install
'-> Act.Run("Path:\To\The\File.exe /Switches"),1,True  
   If InStr(1,Os,"Windows 7",1) Then 
'-> Code Here 
   ElseIf InStr(1,Os,"Windows Vista",1) Then 
'-> Code Here
   ElseIf InStr(1,Os,"Windows XP",1) Then 
'-> Code Here
   ElseIf InStr(1,Os,"Windows 8",1) Then
'-> Code Here
   ElseIf InStr(1,Os,"Windows 8.1",1) Then
'-> Code Here
   End If 
  End If 
'-> Function To Get Os
  Function Os()
   For Each Obj In Wmi.ExecQuery("SELECT * FROM Win32_OperatingSystem")
    Os=Obj.Caption
   Next
  End Function
Rename ChkNetFrameWork2.vbs.txt to ChkNetFrameWork2.vbs make active
Attached File  ChkNetFrameWork2.vbs.txt   1.26KB   2 downloads


Tested this code on my Vista and Win 7 and it return the correct Os, it was the
only way I could test the new code for runtime errors.
Dim Wmi :Set Wmi = GetObject("winmgmts:\\.\root\CIMV2")
   If InStr(1,Os,"Windows 7",1) Then 
'-> Code Here 
    MsgBox Os
   ElseIf InStr(1,Os,"Windows Vista",1) Then    
'-> Code Here
    MsgBox Os
   ElseIf InStr(1,Os,"Windows XP",1) Then 
'-> Code Here
    MsgBox Os
   ElseIf InStr(1,Os,"Windows 8",1) Then
'-> Code Here
    MsgBox Os
   ElseIf InStr(1,Os,"Windows 8.1",1) Then
'-> Code Here
    MsgBox Os
   End If 
'-> Function To Get Os
  Function Os()
   For Each Obj In Wmi.ExecQuery("SELECT * FROM Win32_OperatingSystem")
    Os=Obj.Caption
   Next
  End Function



GunSmokingMan



#6
Yzöwl

Yzöwl

    Wise Owl

  • Super Moderator
  • 4,540 posts
  • Joined 13-October 04
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

I write exe with c#.
I have this problem that .net framework2 be installed automatically in windows xp and .net farmework 3.5 in windows 8 & windows 8.1. I mean I want my exe recognize what is OS then according OS install appropriate .netfaramework.

You shouldn't need a v3.5 executable, .NET Framework version 3.5 is already included with Windows 8, it is an optional component.

 

As for detecting the version, have you read this?



#7
MgmTest

MgmTest

    Junior

  • Member
  • Pip
  • 61 posts
  • Joined 13-January 12
  • OS:Windows 7 x86
  • Country: Country Flag

me Chang .net in 4 but need silent install fast .net Fix Code Me :

not install .net

@ECHO off
cls
FOR %%i IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%i:\Oasdsd.exe SET CDROM=%%i:

SET PP=%cdrom%

set DOTNETINSTALLED=NO

REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\Policy\v4.0" >NUL && set DOTNETINSTALLED=YES

IF %DOTNETINSTALLED%==YES goto MAIN
goto PREREQUISITE

:PREREQUISITE
REM Execute Prerequisite Setup Program
START /wait "%PP%\Microsoft .NET Framework 4.0 32 & 64bit\Setup.exe /q /norestart"

ping -n 10 127.0.0.1 > NULL

:MAIN
REM Execute Main Setup Program
START /wait Oasdsd.exe

Edited by MgmTest, 11 March 2014 - 06:35 AM.


#8
Yzöwl

Yzöwl

    Wise Owl

  • Super Moderator
  • 4,540 posts
  • Joined 13-October 04
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

Which pre-requistite are you checking for, the client profile:
Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client Value: Install, Type: REG_DWORD, Data: 1
or the full version:
Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full Value: Install, Type: REG_DWORD, Data: 1

 
Regardless of that fact, AhrimanSefid, and the fact you haven't acknowledged my last post, your script really needs a rewrite.
 
...try changing the name of your .NET installer directory
From: "Microsoft .NET Framework 4.0 32 & 64bit"
to: "Microsoft .NET Framework 4.0 x86_64"


Then try this:

@ECHO OFF
SETLOCAL
SET "M=Oasdsd.exe"
SET "S=Microsoft .NET Framework 4.0 x86_64\Setup.exe"
SET "F="
SET "N=HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\"
SET "_="

FOR /F %%A IN ('MOUNTVOL^|FINDSTR [C-Z]:\\') DO (IF EXIST "%%A%M%" SET "_=%%A")
IF NOT DEFINED _ GOTO :EOF

FOR %%A IN (Client Full) Do (
    REG QUERY "%N%%%A" /V Install >NUL 2>&1 && SET F=Yes)
IF NOT DEFINED F CALL :PRE

:MAIN
IF DEFINED F ("%_%%M%")
GOTO :EOF

:PRE
IF EXIST "%_%%S%" (SET B=x%PROCESSOR_ARCHITECTURE:~-2%
    IF %B% EQU x86 (IF DEFINED PROCESSOR_ARCHITEW6432 SET B=x64)
    START "" /WAIT "%_%%S%" /%B% /q /norestart && (SET F=Yes))

You'll have to decide for yourself if you require the START "" /WAIT in the bottom line!



#9
DosProbie

DosProbie

    Friend of MSFN

  • MSFN Sponsor
  • 746 posts
  • Joined 16-October 12
  • OS:Windows 8.1 x64
  • Country: Country Flag

Donator

The OP is working both sides of the fence, posted the same over at MDL yesterday with a working solution by ricktendo64..DP :whistle:

Edited by DosProbie, 12 March 2014 - 06:35 AM.


#10
Yzöwl

Yzöwl

    Wise Owl

  • Super Moderator
  • 4,540 posts
  • Joined 13-October 04
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

I've already posted a similar reply here, and read it, but for some reason it doesn't exist anymore!

 

The message posted by ricktendo64 in that other place is most certainly not a solution. It doesn't use the OP's file, installs a different executable and version of .NET framework and doesn't make any attempt to check for the 'prerequisite' existence first.



#11
MgmTest

MgmTest

    Junior

  • Member
  • Pip
  • 61 posts
  • Joined 13-January 12
  • OS:Windows 7 x86
  • Country: Country Flag

Thanks but me not need check 86&64.

and remove line PRE not install .net.

 

"Microsoft .NET Framework 4.0\Setup.exe"

 

 

Which pre-requistite are you checking for, the client profile:
Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client Value: Install, Type: REG_DWORD, Data: 1
or the full version:
Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full Value: Install, Type: REG_DWORD, Data: 1

 
Regardless of that fact, AhrimanSefid, and the fact you haven't acknowledged my last post, your script really needs a rewrite.
 
...try changing the name of your .NET installer directory
From: "Microsoft .NET Framework 4.0 32 & 64bit"
to: "Microsoft .NET Framework 4.0 x86_64"


Then try this:

@ECHO OFF
SETLOCAL
SET "M=Oasdsd.exe"
SET "S=Microsoft .NET Framework 4.0 x86_64\Setup.exe"
SET "F="
SET "N=HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\"
SET "_="

FOR /F %%A IN ('MOUNTVOL^|FINDSTR [C-Z]:\\') DO (IF EXIST "%%A%M%" SET "_=%%A")
IF NOT DEFINED _ GOTO :EOF

FOR %%A IN (Client Full) Do (
    REG QUERY "%N%%%A" /V Install >NUL 2>&1 && SET F=Yes)
IF NOT DEFINED F CALL :PRE

:MAIN
IF DEFINED F ("%_%%M%")
GOTO :EOF

:PRE
IF EXIST "%_%%S%" (SET B=x%PROCESSOR_ARCHITECTURE:~-2%
    IF %B% EQU x86 (IF DEFINED PROCESSOR_ARCHITEW6432 SET B=x64)
    START "" /WAIT "%_%%S%" /%B% /q /norestart && (SET F=Yes))

You'll have to decide for yourself if you require the START "" /WAIT in the bottom line!


Edited by MgmTest, 15 March 2014 - 02:37 AM.


#12
bphlpt

bphlpt

    MSFN Addict

  • Member
  • PipPipPipPipPipPipPip
  • 1,798 posts
  • Joined 12-May 07
  • OS:none specified
  • Country: Country Flag

@MgmTest, once you get a solution that works for you, if you would please post the complete solution here for the benefit of others who might need to do a similar thing we would very much appreciate it.

 

Cheers and Regarads


Posted Image


#13
Yzöwl

Yzöwl

    Wise Owl

  • Super Moderator
  • 4,540 posts
  • Joined 13-October 04
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

Your original requirement told us you were using .NET for x86 and x64, because you appeared to be using a file named setup.exe, my assumption is that you have extracted the files from the official installer. No longer using the official installer means that you would need to be able to provide a switch to the setup routine depending upon the architecture of the host OS, I've done that for you.. If you do not need to check for architecture, learn to provide better information in your requests in future then change the bottom four lines to read:

:PRE
IF EXIST "%_%%S%" (START "" /WAIT "%_%%S%" /q /norestart && (SET F=Yes))

Also if you are having difficulty with something, please make a better attempt at explaining the specifics.
perhaps remove the echo from the script, capture the output and post it here!



#14
MgmTest

MgmTest

    Junior

  • Member
  • Pip
  • 61 posts
  • Joined 13-January 12
  • OS:Windows 7 x86
  • Country: Country Flag

Remove  x86_64

SET "S=\Microsoft .NET Framework 4.0\Setup.exe"

 

1394887538391.png


Edited by MgmTest, 15 March 2014 - 06:56 AM.


#15
bphlpt

bphlpt

    MSFN Addict

  • Member
  • PipPipPipPipPipPipPip
  • 1,798 posts
  • Joined 12-May 07
  • OS:none specified
  • Country: Country Flag

Please post the COMPLETE code for "run", and that of any routines that "run" calls, if appropriate, if you would like our further help.

 

Cheers and Regards


Edited by bphlpt, 15 March 2014 - 07:13 AM.

Posted Image


#16
MgmTest

MgmTest

    Junior

  • Member
  • Pip
  • 61 posts
  • Joined 13-January 12
  • OS:Windows 7 x86
  • Country: Country Flag

bat2exe >>>>> aaa.cmd=run.exe

@ECHO OFF
SETLOCAL
SET "M=Oasdsd.exe"
SET "S=Microsoft .NET Framework 4.0\Setup.exe"
SET "F="
SET "N=HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\"
SET "_="

FOR /F %%A IN ('MOUNTVOL^|FINDSTR [C-Z]:\\') DO (IF EXIST "%%A%M%" SET "_=%%A")
IF NOT DEFINED _ GOTO :EOF

FOR %%A IN (Client Full) Do (
REG QUERY "%N%%%A" /V Install >NUL 2>&1 && SET F=Yes)
IF NOT DEFINED F CALL :PRE

:MAIN
IF DEFINED F ("%_%%M%")
GOTO :EOF

:PRE
IF EXIST "%_%%S%" (START "" /WAIT "%_%%S%" /q /norestart && (SET F=Yes))


#17
Yzöwl

Yzöwl

    Wise Owl

  • Super Moderator
  • 4,540 posts
  • Joined 13-October 04
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

Since I do not currently run a Windows OS, my scripts are not tested!

Try this slightly altered version:

@ECHO OFF
SETLOCAL
SET "M=Oasdsd.exe"
SET "S=Microsoft .NET Framework 4.0\Setup.exe"
SET "F="
SET "N=HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\"
SET "_="

FOR /F %%A IN ('MOUNTVOL^|FINDSTR [C-Z]:\\') DO (IF EXIST "%%A%M%" SET "_=%%A")
IF NOT DEFINED _ GOTO :EOF

IF NOT EXIST "%_%%S%" GOTO :EOF

FOR %%A IN (Client Full) DO (
    REG QUERY "%N%%%A" /V INSTALL >NUL 2>&1 && SET "F=Yes")
IF NOT DEFINED F CALL :PRE

:MAIN
IF DEFINED F ("%_%%M%")
GOTO :EOF

:PRE
START "" /WAIT "%_%%S%" /q /norestart && (SET F=Yes)

<EDIT />

If you intend to wrap my script into an executable, I ask that you credit me in the file properties of that executable.



#18
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,567 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

Well, if I may :unsure:,  the FIRST rule of the Batch club is "You do not use bat to exe converters", the SECOND rule being "You DO NOT use batch to exe converters" ;).
Seriously, save the thing with extension .cmd and test it AS IS, then, and only IF it works as "plain" .cmd, you may try to convert it to a .exe, knowing that there are two kinds of batch to executable converters:

  1. the type that is nothing but a SFX (self executing archive) that will expand the batch *somewhere*, typically in %TEMP% folder and run it from this location
  2. the type that is an actual sort of compiler but that with a rate that I would estimate between 70 and 95%  :w00t: :ph34r: completely FAILS to compile a working program unless it is very - and I mean VERY - basic

For the first you need to make sure that relative paths and similar resolve correctly, for the second kind usually there is nothing that you can do, a given batch either works or it does not.

 

jaclaz


Edited by jaclaz, 15 March 2014 - 07:37 AM.


#19
bphlpt

bphlpt

    MSFN Addict

  • Member
  • PipPipPipPipPipPipPip
  • 1,798 posts
  • Joined 12-May 07
  • OS:none specified
  • Country: Country Flag

If you leave it in the "aaa.cmd" form, do you get the same error?  Any error's thrown should indicate the line number and character position of the error.

 

Cheers and Regards


Posted Image


#20
MgmTest

MgmTest

    Junior

  • Member
  • Pip
  • 61 posts
  • Joined 13-January 12
  • OS:Windows 7 x86
  • Country: Country Flag

I use  Advanced BAT to EXE Converter PRO v2.83 to convert bat to exe, I used it before and I didn't have any problem ,how can it create problem ?and whats that problem?



#21
Yzöwl

Yzöwl

    Wise Owl

  • Super Moderator
  • 4,540 posts
  • Joined 13-October 04
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

If you continue to ignore my posts you will receive no further help and I will ask that you no longer use any of the code I have provided.



#22
MgmTest

MgmTest

    Junior

  • Member
  • Pip
  • 61 posts
  • Joined 13-January 12
  • OS:Windows 7 x86
  • Country: Country Flag

Not Install .Net And Send Error.

 

1394887538391.png

 

bat2exe >>>>> aaa.cmd=run.exe

@ECHO OFF
SETLOCAL
SET "M=Oasdsd.exe"
SET "S=Microsoft .NET Framework 4.0\Setup.exe"
SET "F="
SET "N=HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\"
SET "_="

FOR /F %%A IN ('MOUNTVOL^|FINDSTR [C-Z]:\\') DO (IF EXIST "%%A%M%" SET "_=%%A")
IF NOT DEFINED _ GOTO :EOF

FOR %%A IN (Client Full) Do (
REG QUERY "%N%%%A" /V Install >NUL 2>&1 && SET F=Yes)
IF NOT DEFINED F CALL :PRE

:MAIN
IF DEFINED F ("%_%%M%")
GOTO :EOF

:PRE
IF EXIST "%_%%S%" (START "" /WAIT "%_%%S%" /q /norestart && (SET F=Yes))


#23
Yzöwl

Yzöwl

    Wise Owl

  • Super Moderator
  • 4,540 posts
  • Joined 13-October 04
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

I've attached the script I posted earlier which you ignored, I have wrapped it as an .exe and have also tested it on a Windows OS with success.

The script will not actually install anything, it will only tell you what it would do if I hadn't prevented it.

 

<EDIT />

Removed download - no longer required


Edited by Yzöwl, 16 March 2014 - 04:53 AM.
see <EDIT />


#24
bphlpt

bphlpt

    MSFN Addict

  • Member
  • PipPipPipPipPipPipPip
  • 1,798 posts
  • Joined 12-May 07
  • OS:none specified
  • Country: Country Flag

I use  Advanced BAT to EXE Converter PRO v2.83 to convert bat to exe, I used it before and I didn't have any problem ,how can it create problem ?and whats that problem?

 

Seriously, save the thing with extension .cmd and test it AS IS, then, and only IF it works as "plain" .cmd, you may try to convert it to a .exe, knowing that there are two kinds of batch to executable converters:

  • the type that is nothing but a SFX (self executing archive) that will expand the batch *somewhere*, typically in %TEMP% folder and run it from this location
  • the type that is an actual sort of compiler but that with a rate that I would estimate between 70 and 95%  :w00t: :ph34r: completely FAILS to compile a working program unless it is very - and I mean VERY - basic
For the first you need to make sure that relative paths and similar resolve correctly, for the second kind usually there is nothing that you can do, a given batch either works or it does not.

 


If you leave it in the "aaa.cmd" form, do you get the same error?  Any error's thrown should indicate the line number and character position of the error.

 
If the code doesn't work in "aaa.cmd" form, then there is probably something wrong with the code.  If it doesn't work in "run.exe" form then there is no way to know if there is a problem with the code, the conversion, or the phase of the moon.  First things first.  Confirm whether the code works in "aaa.cmd" form.  DO NOT even try to convert to "run.exe" form until it is working correctly in "aaa.cmd" form.  I know you say you do not need things like the check for x86x64, but try Yzöwl's code UNALTERED and let him help you get it working correctly before you start taking things out of it.  As long as we are giving you one set of code and you are testing a different set, then there is no way to know where your problems are occurring.  But then, if you don't want any help ...
 

@MgmTest, once you get a solution that works for you, if you would please post the complete solution here for the benefit of others who might need to do a similar thing we would very much appreciate it.

 
Cheers and Regards


Edited by bphlpt, 15 March 2014 - 01:24 PM.

Posted Image


#25
MgmTest

MgmTest

    Junior

  • Member
  • Pip
  • 61 posts
  • Joined 13-January 12
  • OS:Windows 7 x86
  • Country: Country Flag

I've attached the script I posted earlier which you ignored, I have wrapped it as an .exe and have also tested it on a Windows OS with success.

The script will not actually install anything, it will only tell you what it would do if I hadn't prevented

thanks for your code,could you plz edit this code?,I change the .Net Folder witch name with &,and introduce software name of convertor witch convert batch files to exe,

 

test file but not install & any key exit BatScript.zip

@ECHO OFF
SETLOCAL
SET "M=Oasdsd.exe"
SET "S=Microsoft .NET Framework 4.0\Setup.exe"
SET "F="
SET "N=HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\"
SET "_="

FOR /F %%A IN ('MOUNTVOL^|FINDSTR [C-Z]:\\') DO (IF EXIST "%%A%M%" SET "_=%%A")
IF NOT DEFINED _ GOTO :EOF

FOR %%A IN (Client Full) Do (
REG QUERY "%N%%%A" /V Install >NUL 2>&1 && SET F=Yes)
IF NOT DEFINED F CALL :PRE

:MAIN
IF DEFINED F ("%_%%M%")
GOTO :EOF

:PRE
IF EXIST "%_%%S%" (START "" /WAIT "%_%%S%" /q /norestart && (SET F=Yes))

Edited by MgmTest, 16 March 2014 - 12:25 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users