File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
1
import vscode = require( 'vscode' ) ;
2
2
import Window = vscode . window ;
3
3
4
+
5
+ /**
4
6
function convertUriToPath(Uri) {
5
7
8
+ window.showInformationMessage(Uri)
6
9
var result = Uri.replace("file://","")
7
10
var result = result.replace("/","\")
8
11
var driveletter = result.substring(0)
9
12
var result = driveletter + ":" + result.substring(1,-1)
10
13
11
14
}
15
+ */
12
16
13
17
export function registerOpenInISECommand ( ) : void {
14
18
var disposable = vscode . commands . registerCommand ( 'PowerShell.OpenInISE' , ( ) => {
15
19
16
20
var editor = Window . activeTextEditor ;
17
21
var document = editor . document ;
18
22
19
- process = require ( 'child_process' ) ;
20
- var filePath = convertUriToPath ( editor . document . uri ) ;
21
- process . exec ( "powershell_ise.exe -NoProfile -File " + filePath ) ;
23
+ //process = require('child_process');
24
+ //var filePath = convertUriToPath(editor.document.uri);
25
+ var filePath = 'C:\temp\Get-ProductKey.ps1'
26
+ require ( "child_process" ) . exec ( "powershell_ise.exe -NoProfile -File " + filePath ) . unref ( ) ;
22
27
23
28
} ) ;
24
29
}
Original file line number Diff line number Diff line change @@ -101,7 +101,6 @@ export function activate(context: vscode.ExtensionContext): void {
101
101
// Register other features
102
102
registerExpandAliasCommand ( languageServerClient ) ;
103
103
registerShowHelpCommand ( languageServerClient ) ;
104
- registerOpenInISECommand ( languageServerClient ) ;
105
104
registerConsoleCommands ( languageServerClient ) ;
106
105
}
107
106
You can’t perform that action at this time.
0 commit comments