Changeset 86558 in vbox for trunk/src/VBox
- Timestamp:
- Oct 13, 2020 2:20:04 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/autostart/tdAutostart1.py
r86556 r86558 1227 1227 if fRc: 1228 1228 sSecPolicyEditor = """ 1229 $oUser = New-Object System.Security.Principal.NTAccount("%s") 1229 $sUser = '%s' 1230 $oUser = New-Object System.Security.Principal.NTAccount("$sUser") 1230 1231 $oSID = $oUser.Translate([System.Security.Principal.SecurityIdentifier]) 1231 $sExportFile = '.\\cfg.inf' 1232 $sSecDb = '.\\secedt.sdb' 1233 $sSecDb1 = '.\\secedt.jfm' 1234 $sImportFile = '.\\newcfg.inf' 1232 $sExportFile = 'C:\\Temp\\cfg.inf' 1233 $sSecDb = 'C:\\Temp\\secedt.sdb' 1234 $sImportFile = 'C:\\Temp\\newcfg.inf' 1235 1235 secedit /export /cfg $sExportFile 1236 1236 $sCurrServiceLogonRight = Get-Content -Path $sExportFile | 1237 Where-Object -FilterScript {$PSItem -match 'SeServiceLogonRight'}1237 Where-Object {$_ -Match 'SeServiceLogonRight'} 1238 1238 $asFileContent = @' 1239 1239 [Unicode] … … 1259 1259 Remove-Item -Path $sSecDb 1260 1260 Remove-Item -Path $sImportFile 1261 Remove-Item -Path $sSecDb11262 1261 """ % (sUser,); 1263 1262 fRc = self.uploadString(oGuestSession, sSecPolicyEditor, 'C:\\Temp\\adjustsec.ps1'); … … 1267 1266 (fRc, _, _, _) = self.guestProcessExecute(oGuestSession, 1268 1267 'Setting the "Logon as service" policy to the user %s' % sUser, 1269 60 * 1000, 'C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe',1270 [' powershell.exe', '-file', 'C:\\Temp\\adjustsec.ps1', '-ExecutionPolicy',1271 'Bypass' ],False, True);1268 300 * 1000, 'C:\\Windows\\System32\\cmd.exe', 1269 ['cmd.exe', '/c', "type C:\\Temp\\adjustsec.ps1 | powershell -"], 1270 False, True); 1272 1271 if not fRc: 1273 1272 reporter.error('Setting the "Logon as service" policy to the user %s failed' % sUser);
Note:
See TracChangeset
for help on using the changeset viewer.