windows-10

How can I associate a file type with a powershell script?

雨燕双飞 提交于 2020-02-20 05:37:04
问题 I have a very powershell script that works perfectly and does: Param( [string]$fileName ) echo "Woo I opened $fileName" When I run it on the command line, it works: my-script.ps1 .\somefile Returns: Woo I opened somefile I would like to associate my-script.ps1 with a particular file type. I am attempting to do this via 'Open With' However: Windows doesn't include Powershell scripts as 'Programs' (though it considers CMD and batch scripts as 'Programs') When I pick 'All Files' instead, and

How can I associate a file type with a powershell script?

£可爱£侵袭症+ 提交于 2020-02-20 05:33:20
问题 I have a very powershell script that works perfectly and does: Param( [string]$fileName ) echo "Woo I opened $fileName" When I run it on the command line, it works: my-script.ps1 .\somefile Returns: Woo I opened somefile I would like to associate my-script.ps1 with a particular file type. I am attempting to do this via 'Open With' However: Windows doesn't include Powershell scripts as 'Programs' (though it considers CMD and batch scripts as 'Programs') When I pick 'All Files' instead, and

How can I associate a file type with a powershell script?

◇◆丶佛笑我妖孽 提交于 2020-02-20 05:32:25
问题 I have a very powershell script that works perfectly and does: Param( [string]$fileName ) echo "Woo I opened $fileName" When I run it on the command line, it works: my-script.ps1 .\somefile Returns: Woo I opened somefile I would like to associate my-script.ps1 with a particular file type. I am attempting to do this via 'Open With' However: Windows doesn't include Powershell scripts as 'Programs' (though it considers CMD and batch scripts as 'Programs') When I pick 'All Files' instead, and

How to make EntranceThemeTransition works on a Custom Panel & ItemsSource?

孤街浪徒 提交于 2020-02-16 02:41:26
问题 I can't get EntranceThemeTransition to work on a custom panel as ItemsPanelTemplate. See: Simplest code behind: public List<int> MyListExample = new List<int>() {0, 1, 2, 3, 4, 5}; Simplest XAML: <ListView Width="120" ItemsSource="{x:Bind MyListExample}"> <ListView.ItemContainerTransitions> <TransitionCollection> <EntranceThemeTransition FromVerticalOffset="200" IsStaggeringEnabled="True"/> </TransitionCollection> </ListView.ItemContainerTransitions> <ListView.ItemsPanel> <ItemsPanelTemplate>

How to make EntranceThemeTransition works on a Custom Panel & ItemsSource?

只愿长相守 提交于 2020-02-16 02:40:09
问题 I can't get EntranceThemeTransition to work on a custom panel as ItemsPanelTemplate. See: Simplest code behind: public List<int> MyListExample = new List<int>() {0, 1, 2, 3, 4, 5}; Simplest XAML: <ListView Width="120" ItemsSource="{x:Bind MyListExample}"> <ListView.ItemContainerTransitions> <TransitionCollection> <EntranceThemeTransition FromVerticalOffset="200" IsStaggeringEnabled="True"/> </TransitionCollection> </ListView.ItemContainerTransitions> <ListView.ItemsPanel> <ItemsPanelTemplate>

How to make EntranceThemeTransition works on a Custom Panel & ItemsSource?

回眸只為那壹抹淺笑 提交于 2020-02-16 02:38:30
问题 I can't get EntranceThemeTransition to work on a custom panel as ItemsPanelTemplate. See: Simplest code behind: public List<int> MyListExample = new List<int>() {0, 1, 2, 3, 4, 5}; Simplest XAML: <ListView Width="120" ItemsSource="{x:Bind MyListExample}"> <ListView.ItemContainerTransitions> <TransitionCollection> <EntranceThemeTransition FromVerticalOffset="200" IsStaggeringEnabled="True"/> </TransitionCollection> </ListView.ItemContainerTransitions> <ListView.ItemsPanel> <ItemsPanelTemplate>

ListView ManipulationCompleted event doesn't work on phone

元气小坏坏 提交于 2020-02-14 02:48:30
问题 I have this code in a Windows 10 UWP application: MyListView.ManipulationMode = ManipulationModes.TranslateX; MyListView.ManipulationStarted += (s, e) => x1 = (int)e.Position.X; MyListView.ManipulationCompleted += (s, e) => { x2 = (int)e.Position.X; if (x1 > x2) { DataController.PaneOpen(false); }; if (x1 < x2) { DataController.PaneOpen(true); }; }; The ManipulationCompleted event doesn't work on phone in ListView . The code inside the handler never gets called. It's working fine on PC, but

Windows 10 Internet Explorer is not working with old VBA code

烂漫一生 提交于 2020-02-07 02:27:12
问题 I wrote code in VBA a couple years ago to open a website in IE and fill in textboxes with data from an excel file. Unfortunately I am using windows 10 now and this program is not working anymore. It opens the website with no problem, but cannot transpose the data into the textboxes. It simply opens the website and stalls (no data is entered). The program still works in IE in windows 7, without any problem. I tried multiple laptops with windows 10 and the problem reoccurs. I honestly don't

Creating a buffer overflow on windows 10

一个人想着一个人 提交于 2020-02-07 00:02:29
问题 Soon, I am due to be giving a presentation to my class (doing a degree in computer science) where I want to give a basic example of a buffer overflow and why it's a problem. However, I can't get my buffer overflow to work. The issue is that as soon as the crash is caused, the process is terminated, even if the process is attached to a debugger like xdbg (in VS, an exception is thrown). I think this is caused by one of the protections built into Windows 10. I have gone through the following

Creating a buffer overflow on windows 10

一曲冷凌霜 提交于 2020-02-07 00:00:11
问题 Soon, I am due to be giving a presentation to my class (doing a degree in computer science) where I want to give a basic example of a buffer overflow and why it's a problem. However, I can't get my buffer overflow to work. The issue is that as soon as the crash is caused, the process is terminated, even if the process is attached to a debugger like xdbg (in VS, an exception is thrown). I think this is caused by one of the protections built into Windows 10. I have gone through the following