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

Add Right click .wim Windows 7 or Windows 8/8.1


  • Please log in to reply
108 replies to this topic

#101
Octopuss

Octopuss

    I am the walrus

  • Member
  • PipPipPipPipPipPip
  • 1,127 posts
  • Joined 31-January 07
  • OS:Windows 7 x64
  • Country: Country Flag

Donator

Oh. Do you have an older version without any Powershell in it then?

Also, just a cosmetic thing, but wouldn't you consider rewriting the file so commands are in the order they appear in the menu? Currently it can be pretty hard to find the appropriate lines if you want to change the whole thing a little.

Edited by TheWalrus, 23 June 2013 - 12:16 AM.



How to remove advertisement from MSFN

#102
maxXPsoft

maxXPsoft

    MSFN Master

  • Developer
  • 2,888 posts
  • Joined 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

Oh. Do you have an older version without any Powershell in it then?

Powershell does a get-wiminfo and creates the list we have now. I see "" around it but as I said dism don't play well with blank spaces

The old way had a line for each image and it was long and took up several slots in a list can only have 16 things
Posted Image
Uploaded with ImageShack.us

I used this
@="cmd /c C:\\Windows\\System32\\Dism /mount-wim /wimfile:\"%1\" /index:1 /mountdir:C:\\zMountDir"

Edited by maxXPsoft, 23 June 2013 - 08:07 AM.

Download ++> Windows 7 + 8 Unattended DVD + App Installer + Services Disabler + Load All Button + XML Creator
Jump2Reg - Registry: - Oct 4, 2013 - Version 3.0.4 - 98, ME, NT, 2K, XP, VISTA, Seven, Windows 8+ and 32 or 64 bit

XP Unattended CD/DVD creator - Version 4.1.7
Sample xml + Setupcomplete + Add Right click .wim Windows 7 or Windows 8/8.1

#103
maxXPsoft

maxXPsoft

    MSFN Master

  • Developer
  • 2,888 posts
  • Joined 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag
; 08/8/2013
;   Added reg scripts for Windows 8.1 with Windows Assessment and Deployment Kit (Windows ADK) for Windows 8.1 installed for both amd64 and x86
;     C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit
;     (ADK) http://www.microsoft.com/en-us/download/details.aspx?id=39306

WIMrightclick_ Install_8.1_amd64.reg

WIMrightclick_ Install_8.1_x86.reg

 

Dism no longer works from Windows 7 System32 on Windows 8.1 Preview. You will have to use the (ADK) from Windows 8.1.

It is backwards compatible so no problem using on your Windows 7 images

Link in my Sig or first Post


Edited by maxXPsoft, 08 August 2013 - 12:29 PM.

Download ++> Windows 7 + 8 Unattended DVD + App Installer + Services Disabler + Load All Button + XML Creator
Jump2Reg - Registry: - Oct 4, 2013 - Version 3.0.4 - 98, ME, NT, 2K, XP, VISTA, Seven, Windows 8+ and 32 or 64 bit

XP Unattended CD/DVD creator - Version 4.1.7
Sample xml + Setupcomplete + Add Right click .wim Windows 7 or Windows 8/8.1

#104
MrJinje

MrJinje

    Tool™ Developer

  • Developer
  • 1,039 posts
  • Joined 14-October 09
  • OS:none specified
  • Country: Country Flag

Hey Max, found a newer method to get feedback during scripts.   Won't work in W7, but does work in W8 and above.  Basically the Out-Gridview has a new parameter (-passthru) in Powershell 3.0/4.0 which adds an OK/Cancel to the window.   Allows for multiple item selection and directs input back into the pipeline.  Been around since last year, but I never used it 'til recently.

 

Here is an example, it opens up a list of processes, allows you to choose a single or multiple processes, collects their names and loops through closing all the highlighted items.   Probably be easy enough to drop the Get-WimInfo in place of the "Get-Process | Select-Object -Property Id,ProcessName" part of the command and the mounting bits later to generate a little GUI action.

 

http://forums.mydigi...ll=1#post843819

$KILLPROCESS = (Get-Process | Select-Object -Property Id,ProcessName | Out-GridView -passthru -Title "Wise Guy Process Killer").ProcessName;Get-Process $KILLPROCESS | ForEach-Object -Process {Stop-Process -Id $_.ID}
#

Edited by MrJinje, 19 November 2013 - 10:43 PM.


#105
maxXPsoft

maxXPsoft

    MSFN Master

  • Developer
  • 2,888 posts
  • Joined 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

1


Edited by maxXPsoft, 20 November 2013 - 10:43 PM.

Download ++> Windows 7 + 8 Unattended DVD + App Installer + Services Disabler + Load All Button + XML Creator
Jump2Reg - Registry: - Oct 4, 2013 - Version 3.0.4 - 98, ME, NT, 2K, XP, VISTA, Seven, Windows 8+ and 32 or 64 bit

XP Unattended CD/DVD creator - Version 4.1.7
Sample xml + Setupcomplete + Add Right click .wim Windows 7 or Windows 8/8.1

#106
maxXPsoft

maxXPsoft

    MSFN Master

  • Developer
  • 2,888 posts
  • Joined 14-November 03
  • OS:Windows 7 x64
  • Country: Country Flag

 


$KILLPROCESS = (Get-Process | Select-Object -Property Id,ProcessName | Out-GridView -passthru -Title "Wise Guy Process Killer").ProcessName;Get-Process $KILLPROCESS | ForEach-Object -Process {Stop-Process -Id $_.ID}
#

I've been trying to figure out how to add certain things to the registry with a reg script and change them if they 32 or 64 bit. example

C:\Program Files

C:\Program Files (x86)

I can get the processor but not this

 


Edited by maxXPsoft, 20 November 2013 - 10:43 PM.

Download ++> Windows 7 + 8 Unattended DVD + App Installer + Services Disabler + Load All Button + XML Creator
Jump2Reg - Registry: - Oct 4, 2013 - Version 3.0.4 - 98, ME, NT, 2K, XP, VISTA, Seven, Windows 8+ and 32 or 64 bit

XP Unattended CD/DVD creator - Version 4.1.7
Sample xml + Setupcomplete + Add Right click .wim Windows 7 or Windows 8/8.1

#107
MrJinje

MrJinje

    Tool™ Developer

  • Developer
  • 1,039 posts
  • Joined 14-October 09
  • OS:none specified
  • Country: Country Flag

I've been trying to figure out how to add certain things to the registry with a reg script and change them if they 32 or 64 bit. example
C:\Program Files
C:\Program Files (x86)
I can get the processor but not this


Try this, it should pipe the (x86) path on x64 builds.  Note: From powershell if the registry key does not exist it'll error on set-itemproperty, so we test-path beforehand to be safe. 
 
If ((Get-WmiObject -class Win32_OperatingSystem | Select-Object OSArchitecture).OSArchitecture -eq "64-bit") {$PROGS = "C:\Program Files (x86)"}else{$PROGS = "C:\Program Files"}

$PROGS

If ( -Not (Test-Path 'registry::HKEY_CURRENT_USER\Software\Jinje')) {New-Item -Path 'registry::HKEY_CURRENT_USER\Software\' -Name Jinje -Force;}
Set-ItemProperty -Path 'registry::HKEY_CURRENT_USER\Software\Jinje' -Name $PROGS -Value 1;
#
Unless I am mistaken and could have just used the new-itemproperty the whole time.    Oh well getting late.

Here I am using null "" variables to toggle ($OFF / $ON) for something, in case you ever wanted to switch from a mounted image to an online image.

http://forums.mydigi...ll=1#post837143

If ($radiobuttonOnline.Checked -eq $true){$On = " /online "}else{$On = ""}
If ($radiobuttonOffline.Checked -eq $true){$Off = " /Image:" + $MountPath + "\Windows "}else{$Off = ""}

and because they are toggled null, we can be lazy and send both variables into the command, knowing one of them would be blank.

$labelParse.text = "cscript.exe " + $MOVE + "\sxsextract.vbs" + $DEB + $VIC + $RES + $On + $Off + $textbox1.text + " " + $textbox2.text

Edited by MrJinje, 21 November 2013 - 11:32 PM.


#108
bphlpt

bphlpt

    MSFN Addict

  • Member
  • PipPipPipPipPipPipPip
  • 1,798 posts
  • Joined 12-May 07
  • OS:none specified
  • Country: Country Flag
I could be wrong, but I think you can replace this:
If ( -Not (Test-Path 'registry::HKEY_CURRENT_USER\Software\Jinje'))
{
New-Item -Path 'registry::HKEY_CURRENT_USER\Software\' -Name Jinje -Force;
Set-ItemProperty -Path 'registry::HKEY_CURRENT_USER\Software\Jinje' -Name $PROGS -Value 1;
}else{
Set-ItemProperty -Path 'registry::HKEY_CURRENT_USER\Software\Jinje' -Name $PROGS -Value 1;
}
with this:

If ( -Not (Test-Path 'registry::HKEY_CURRENT_USER\Software\Jinje')) {New-Item -Path 'registry::HKEY_CURRENT_USER\Software\' -Name Jinje -Force;}
Set-ItemProperty -Path 'registry::HKEY_CURRENT_USER\Software\Jinje' -Name $PROGS -Value 1;
Correct?

Cheers and Regards

Posted Image


#109
MrJinje

MrJinje

    Tool™ Developer

  • Developer
  • 1,039 posts
  • Joined 14-October 09
  • OS:none specified
  • Country: Country Flag

with this:
 

If ( -Not (Test-Path 'registry::HKEY_CURRENT_USER\Software\Jinje')) {New-Item -Path 'registry::HKEY_CURRENT_USER\Software\' -Name Jinje -Force;}
Set-ItemProperty -Path 'registry::HKEY_CURRENT_USER\Software\Jinje' -Name $PROGS -Value 1;
Correct?

Cheers and Regards

Good eye. I slapped that together pretty haphazardly. But then again, Max is entering them via a .reg file, so they will pre-exist, moot point.

 

Was reading here, just some info for me on the appcompatflags you've been using.

 

http://www.novell.co....php?id=7010269

 

Configuring Applications to Always Request Elevated Rights:
Programs can be configured to always request elevation on the user level via registry settings under HKCU. These registry settings are effective on the fly, so they can be set immediately prior to launching a particular application and even removed as soon as the application is launched, if so desired. Simply create a “String Value” under“HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers” for the full path to an executable with a value of “RUNASADMIN”. Below is an example for CMD.

 

Windows Registry Editor Version 5.00
[HKEY_Current_User\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
"c:\\windows\\system32\\cmd.exe"="RUNASADMIN" 

Edited by MrJinje, 22 November 2013 - 11:47 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN