-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVSIxg_remove.pl
62 lines (55 loc) · 1.05 KB
/
VSIxg_remove.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
use strict;
use File::Spec;
use File::Copy;
use Digest::MD5;
my $folder = File::Spec->catfile( $ENV{ ProgramFiles }, 'SN Systems', 'Common', 'VSI', 'bin' );
if ( !-e $folder )
{
print( "$folder does not exist!\n" );
exit( 1 );
}
my $source = File::Spec->catfile( $folder, 'snmake.exe' );
my $target = File::Spec->catfile( $folder, 'vsimake.exe' );
if ( -e $source )
{
if ( -e $target )
{
unlink( $target );
if ( !-e $target )
{
print ("\nDeleted $target\n");
}
else
{
print ("\nUnable to delete $target : $!\n");
exit 1;
}
}
if ( move( $source, $target ) )
{
print( "\nMove $source\n -> $target\n" );
}
else
{
print( "\nUnable to move $source\n -> $target\n : $!" );
exit 1;
}
my $xml = File::Spec->catfile( $folder, 'vsixg.xml' );
if ( -e $xml )
{
unlink( $xml );
if ( !-e $xml )
{
print ("\nDeleted $xml\n");
}
else
{
print ("\nUnable to delete $xml : $!\n");
exit 1;
}
}
}
else
{
print( "vsixg.exe is not installed\n" );
}