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 11import vscode = require( 'vscode' ) ;
22import Window = vscode . window ;
33
4+
5+ /**
46function convertUriToPath(Uri) {
57
8+ window.showInformationMessage(Uri)
69 var result = Uri.replace("file://","")
710 var result = result.replace("/","\")
811 var driveletter = result.substring(0)
912 var result = driveletter + ":" + result.substring(1,-1)
1013
1114}
15+ */
1216
1317export function registerOpenInISECommand ( ) : void {
1418 var disposable = vscode . commands . registerCommand ( 'PowerShell.OpenInISE' , ( ) => {
1519
1620 var editor = Window . activeTextEditor ;
1721 var document = editor . document ;
1822
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 ( ) ;
2227
2328 } ) ;
2429}
Original file line number Diff line number Diff line change @@ -101,7 +101,6 @@ export function activate(context: vscode.ExtensionContext): void {
101101 // Register other features
102102 registerExpandAliasCommand ( languageServerClient ) ;
103103 registerShowHelpCommand ( languageServerClient ) ;
104- registerOpenInISECommand ( languageServerClient ) ;
105104 registerConsoleCommands ( languageServerClient ) ;
106105}
107106
You can’t perform that action at this time.
0 commit comments